version 1.7.3.0
[socat.git] / xio-ipapp.h
blobc2dcb1e659dc7fa7df070566e5064ea32c4f9a42
1 /* source: xio-ipapp.h */
2 /* Copyright Gerhard Rieger 2001-2008 */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __xio_ipapp_h_included
6 #define __xio_ipapp_h_included 1
9 /* when selecting a low port, this is the lowest possible */
10 #define XIO_IPPORT_LOWER 640
13 extern const struct optdesc opt_sourceport;
14 /*extern const struct optdesc opt_port;*/
15 extern const struct optdesc opt_lowport;
17 extern int xioopen_ipapp_connect(int argc, const char *argv[], struct opt *opts, int xioflags, xiofile_t *fd,
18 unsigned groups, int socktype,
19 int ipproto, int protname);
20 extern int
21 _xioopen_ipapp_prepare(struct opt *opts, struct opt **opts0,
22 const char *hostname,
23 const char *portname, int *pf, int protocol,
24 unsigned long res_opts0, unsigned long res_opts1,
25 union sockaddr_union *them, socklen_t *themlen,
26 union sockaddr_union *us, socklen_t *uslen,
27 bool *needbind, bool *lowport,
28 int socktype);
29 extern int _xioopen_ip4app_connect(const char *hostname, const char *portname,
30 struct single *xfd,
31 int socktype, int ipproto, void *protname,
32 struct opt *opts);
33 extern int xioopen_ipapp_listen(int argc, const char *argv[], struct opt *opts,
34 int xioflags, xiofile_t *fd,
35 unsigned groups, int socktype,
36 int ipproto, int protname);
37 extern int _xioopen_ipapp_listen_prepare(struct opt *opts, struct opt **opts0,
38 const char *portname, int *pf, int ipproto,
39 unsigned long res_opts0,
40 unsigned long res_opts1,
41 union sockaddr_union *us, socklen_t *uslen,
42 int socktype);
43 extern int xioopen_ip6app_connect(int argc, const char *argv[], struct opt *opts,
44 int rw, xiofile_t *fd,
45 unsigned groups, int socktype, int ipproto,
46 void *protname);
48 #endif /* !defined(__xio_ipapp_h_included) */