]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * This file is provided for use with the unix-socket-faq. It is public | |
3 | * domain, and may be copied freely. There is no copyright on it. The | |
4 | * original work was by Vic Metcalfe (vic@brutus.tlug.org), and any | |
5 | * modifications made to that work were made with the understanding that | |
6 | * the finished work would be in the public domain. | |
7 | * | |
8 | * If you have found a bug, please pass it on to me at the above address | |
9 | * acknowledging that there will be no copyright on your work. | |
10 | * | |
11 | * The most recent version of this file, and the unix-socket-faq can be | |
12 | * found at http://www.interlog.com/~vic/sock-faq/. | |
13 | */ | |
14 | ||
15 | #ifndef _SOCKHELP_H_ | |
16 | #define _SOCKHELP_H_ | |
17 | ||
18 | ||
19 | #include <signal.h> | |
20 | #include <stdio.h> | |
21 | #include <stdlib.h> | |
22 | #include <string.h> | |
23 | #include <sys/types.h> | |
24 | #include <sys/socket.h> | |
25 | #include <errno.h> | |
26 | #include <unistd.h> | |
27 | #include <netinet/in.h> | |
28 | #include <limits.h> | |
29 | #include <netdb.h> | |
30 | #include <arpa/inet.h> | |
31 | ||
32 | int atoport( char *service, char *proto); | |
33 | struct in_addr *atoaddr(char *address); | |
34 | int get_connection(int socket_type, u_short port, int *listener); | |
35 | int make_connection(char *service, int type, char *netaddress); | |
36 | int sock_read(int sockfd, char *buf, size_t count); | |
37 | int sock_write(int sockfd, const char *buf, size_t count); | |
38 | int sock_gets( int sockfd, char *str, size_t count ); | |
39 | int sock_puts(int sockfd, const char *str); | |
40 | void ignore_pipe(void); | |
41 | ||
42 | #endif | |
43 |