Version 1.8.0.0
[socat.git] / xio-ip.h
blobaa2112d1aa5a22f07a1f487ea03ac7114477f18a
1 /* source: xio-ip.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_ip_h_included
6 #define __xio_ip_h_included 1
8 extern const struct optdesc opt_ip_options;
9 extern const struct optdesc opt_ip_pktinfo;
10 extern const struct optdesc opt_ip_recvtos;
11 extern const struct optdesc opt_ip_recvttl;
12 extern const struct optdesc opt_ip_recvopts;
13 extern const struct optdesc opt_ip_retopts;
14 extern const struct optdesc opt_ip_tos;
15 extern const struct optdesc opt_ip_ttl;
16 extern const struct optdesc opt_ip_hdrincl;
17 extern const struct optdesc opt_ip_recverr;
18 extern const struct optdesc opt_ip_mtu_discover;
19 extern const struct optdesc opt_ip_mtu;
20 extern const struct optdesc opt_ip_freebind;
21 extern const struct optdesc opt_ip_router_alert;
22 extern const struct optdesc opt_ip_multicast_ttl;
23 extern const struct optdesc opt_ip_multicast_loop;
24 extern const struct optdesc opt_ip_multicast_if;
25 extern const struct optdesc opt_ip_pktoptions;
26 extern const struct optdesc opt_ip_add_membership;
27 extern const struct optdesc opt_ip_add_source_membership;
28 extern const struct optdesc opt_ip_recvdstaddr;
29 extern const struct optdesc opt_ip_recvif;
30 extern const struct optdesc opt_ip_transparent;
32 extern const struct optdesc opt_ai_addrconfig;
33 extern const struct optdesc opt_ai_passive;
34 extern const struct optdesc opt_ai_v4mapped;
36 extern const struct optdesc opt_res_debug;
37 extern const struct optdesc opt_res_aaonly;
38 extern const struct optdesc opt_res_usevc;
39 extern const struct optdesc opt_res_primary;
40 extern const struct optdesc opt_res_igntc;
41 extern const struct optdesc opt_res_recurse;
42 extern const struct optdesc opt_res_defnames;
43 extern const struct optdesc opt_res_stayopen;
44 extern const struct optdesc opt_res_dnsrch;
45 extern const struct optdesc opt_res_retrans;
46 extern const struct optdesc opt_res_retry;
47 extern const struct optdesc opt_res_nsaddr;
49 extern int xioinit_ip(int *pf, char ipv);
51 extern int xiogetaddrinfo(const char *node, const char *service, int family, int socktype, int protocol, struct addrinfo **res, const int ai_flags[2]);
52 extern void xiofreeaddrinfo(struct addrinfo *res);
53 extern int xioresolve(const char *node, const char *service, int family, int socktype, int protocol, union sockaddr_union *addr, socklen_t *addrlen, const int ai_flags[2]);
54 extern int xiolog_ancillary_ip(struct single *sfd, struct cmsghdr *cmsg, int *num, char *typbuff, int typlen, char *nambuff, int namlen, char *envbuff, int envlen, char *valbuff, int vallen);
55 extern int xiotype_ip_add_membership(char *token, const struct optname *ent, struct opt *opt);
56 extern int xioapply_ip_add_membership(xiosingle_t *xfd, struct opt *opt);
57 extern int xiotype_ip_add_source_membership(char* token, const struct optname *ent, struct opt *opt);
58 extern int xioapply_ip_add_source_membership(struct single *xfd, struct opt *opt);
60 #if WITH_RESOLVE && HAVE_RESOLV_H
61 extern int xio_res_init(struct single *sfd, struct __res_state *save_res);
62 extern int xio_res_restore(struct __res_state *save_res);
63 #endif /* WITH_RESOLVE && HAVE_RESOLV_H */
65 #endif /* !defined(__xio_ip_h_included) */