1 /***************************************************************************
2  * LPRng - An Extended Print Spooler System
3  *
4  * Copyright 1988-2003, Patrick Powell, San Diego, CA
5  *     papowell@lprng.com
6  * See LICENSE for conditions of use.
7  ***************************************************************************/
8 
9 
10 
11 #ifndef _LINKSUPPORT_H_
12 #define _LINKSUPPORT_H_ 1
13 
14 #include "config.h"
15 
16 #if !defined(HAVE_INET_NTOP)
17  const char *inet_ntop( int family, const void *addr,
18 	char *str, size_t len );
19 #endif
20 #if !defined(HAVE_INET_PTON)
21  int inet_pton( int family, const char *strptr, void *addr );
22 #endif
23 
24 /* PROTOTYPES */
25 int Link_setreuse( int sock );
26 void Set_linger( int sock, int n );
27 int Link_listen( char *port_name );
28 int Unix_link_listen( char *unix_socket_path );
29 int Link_open(char *host, int timeout, struct sockaddr *bindto,
30 	char *unix_socket_path, char *errmsg, int errlen );
31 int Link_open_type(char *host, int timeout, int connection_type,
32 	struct sockaddr *bindto, char * unix_socket_path, char *errmsg, int errlen );
33 int Link_open_list( char *hostlist, char **result,
34 	int timeout, struct sockaddr *bindto, char *unix_socket_path, char *errmsg, int errlen );
35 void Link_close( int timeout, int *sock );
36 int Link_send( char *host, int *sock, int timeout,
37 	const char *sendstr, int count, int *ack );
38 int Link_copy( char *host, int *sock, int readtimeout, int writetimeout,
39 	const char *src, int fd, double pcount);
40 int Link_dest_port_num( char *port );
41 int Link_line_read(char *host, int *sock, int timeout,
42 	  char *buf, int *count );
43 int Link_read(char *host, int *sock, int timeout,
44 	  char *buf, int *count );
45 int Link_file_read(char *host, int *sock, int readtimeout, int writetimeout,
46 	  int fd, double *count, int *ack );
47 const char *Link_err_str (int n);
48 const char *Ack_err_str (int n);
49 int AF_Protocol(void);
50 const char *inet_ntop_sockaddr( struct sockaddr *addr,
51 	char *str, int len );
52 
53 #endif
54