Revision 28, 1.8 KB
(checked in by andreu, 16 years ago)
|
debug mode in compilation option - Wno-long-long - copyright update
|
-
Property svn:eol-style set to
native
|
Rev | Line | |
---|
[2] | 1 | |
---|
| 2 | |
---|
| 3 | |
---|
[28] | 4 | |
---|
[2] | 5 | |
---|
[28] | 6 | |
---|
[2] | 7 | |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | #ifndef REMOTE_OUTPUT_H |
---|
| 26 | #define REMOTE_OUTPUT_H |
---|
| 27 | |
---|
| 28 | #include <stdio.h> |
---|
| 29 | #include <stdlib.h> |
---|
[8] | 30 | #include <errno.h> |
---|
| 31 | #include <syslog.h> |
---|
[2] | 32 | #include <unistd.h> |
---|
| 33 | #include <arpa/inet.h> |
---|
| 34 | #include <netdb.h> |
---|
| 35 | #include <netinet/in.h> |
---|
| 36 | #include <sys/types.h> |
---|
| 37 | #include <sys/socket.h> |
---|
| 38 | |
---|
| 39 | typedef struct RemoteHost * RemoteHostPtr; |
---|
| 40 | typedef struct RemoteHost { |
---|
| 41 | int sockId; |
---|
[8] | 42 | struct sockaddr_storage *hostAddressPtr; |
---|
[2] | 43 | RemoteHostPtr next; |
---|
| 44 | } RemoteHostType; |
---|
| 45 | |
---|
| 46 | typedef struct Db * DbPtr; |
---|
| 47 | typedef struct Db { |
---|
| 48 | struct sockaddr_in serverAddress; |
---|
| 49 | char *dbName; |
---|
| 50 | char *password; |
---|
| 51 | char *tableName; |
---|
| 52 | DbPtr next; |
---|
| 53 | } DbType; |
---|
| 54 | |
---|
| 55 | typedef struct File * FilePtr; |
---|
| 56 | typedef struct File { |
---|
| 57 | char *fileName; |
---|
| 58 | FilePtr next; |
---|
| 59 | } FileType; |
---|
| 60 | |
---|
| 61 | void printHostDef(RemoteHostPtr); |
---|
| 62 | void freeRemoteHost(RemoteHostPtr); |
---|
| 63 | void freeDb(DbPtr); |
---|
| 64 | void freeFile(FilePtr); |
---|
[8] | 65 | int create_socket(char *, char *, struct sockaddr_storage *); |
---|
| 66 | int sendMessage(int, unsigned char *, int, struct sockaddr_storage *); |
---|
[2] | 67 | |
---|
| 68 | #endif |
---|