1 /* source: xio-ipapp.h */
2 /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
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
, const struct addrdesc
*addrdesc
);
18 extern int _xioopen_ipapp_prepare(struct opt
*opts
, struct opt
**opts0
, const char *hostname
, const char *portname
, int *pf
, int protocol
, const int ai_flags
[2], struct addrinfo
**res
, union sockaddr_union
*us
, socklen_t
*uslen
, bool *needbind
, bool *lowport
, int socktype
);
19 extern int _xioopen_ip4app_connect(const char *hostname
, const char *portname
,
21 int socktype
, int ipproto
, void *protname
,
23 extern int xioopen_ipapp_listen(int argc
, const char *argv
[], struct opt
*opts
, int xioflags
, xiofile_t
*fd
, const struct addrdesc
*addrdesc
);
24 extern int _xioopen_ipapp_listen_prepare(struct opt
*opts
, struct opt
**opts0
, const char *portname
, int *pf
, int ipproto
, const int ai_flags
[2], union sockaddr_union
*us
, socklen_t
*uslen
, int socktype
);
25 extern int _xio_sort_ip_addresses(struct addrinfo
*themlist
, struct addrinfo
**ai_sorted
);
27 #endif /* !defined(__xio_ipapp_h_included) */