Revision 154, 1.8 KB
(checked in by andreu, 12 years ago)
|
Typo correction and copyright update
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
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> |
---|
30 | #include <errno.h> |
---|
31 | #include <syslog.h> |
---|
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; |
---|
42 | struct sockaddr_storage *hostAddressPtr; |
---|
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); |
---|
65 | int create_socket(char *, char *, struct sockaddr_storage *); |
---|
66 | int sendMessage(int, unsigned char *, int, struct sockaddr_storage *); |
---|
67 | |
---|
68 | #endif |
---|