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_all
;
34 extern const struct optdesc opt_ai_passive
;
35 extern const struct optdesc opt_ai_v4mapped
;
37 extern const struct optdesc opt_res_debug
;
38 extern const struct optdesc opt_res_aaonly
;
39 extern const struct optdesc opt_res_usevc
;
40 extern const struct optdesc opt_res_primary
;
41 extern const struct optdesc opt_res_igntc
;
42 extern const struct optdesc opt_res_recurse
;
43 extern const struct optdesc opt_res_defnames
;
44 extern const struct optdesc opt_res_stayopen
;
45 extern const struct optdesc opt_res_dnsrch
;
46 extern const struct optdesc opt_res_retrans
;
47 extern const struct optdesc opt_res_retry
;
48 extern const struct optdesc opt_res_nsaddr
;
50 extern int xioinit_ip(int *pf
, char ipv
);
52 extern int xiogetaddrinfo(const char *node
, const char *service
, int family
, int socktype
, int protocol
, struct addrinfo
***ai_sorted
, const int ai_flags
[2]);
53 extern void xiofreeaddrinfo(struct addrinfo
**ai_sorted
);
54 extern int _xio_sort_ip_addresses(struct addrinfo
*themlist
, struct addrinfo
**ai_sorted
);
55 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]);
56 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
);
57 extern int xiotype_ip_add_membership(char *token
, const struct optname
*ent
, struct opt
*opt
);
58 extern int xioapply_ip_add_membership(xiosingle_t
*xfd
, struct opt
*opt
);
59 extern int xiotype_ip_add_source_membership(char* token
, const struct optname
*ent
, struct opt
*opt
);
60 extern int xioapply_ip_add_source_membership(struct single
*xfd
, struct opt
*opt
);
62 #if WITH_RESOLVE && HAVE_RESOLV_H
63 extern int xio_res_init(struct single
*sfd
, struct __res_state
*save_res
);
64 extern int xio_res_restore(struct __res_state
*save_res
);
65 #endif /* WITH_RESOLVE && HAVE_RESOLV_H */
67 #endif /* !defined(__xio_ip_h_included) */