Lines Matching refs:addrinfo

35  *    If the operating system does not provide a struct addrinfo, the
39 * struct addrinfo {
47 * struct addrinfo *ai_next; // next structure in linked list
52 * hints is an optional pointer to a struct addrinfo. This structure can
77 * ai_canonname of the first addrinfo structure returned. Setting
98 * All other elements of the struct addrinfo passed via hints must be
101 * A hints of NULL is treated as if the caller provided a struct addrinfo
105 * linked list of one or more addrinfo structures. Each struct addrinfo
108 * and ai_protocol in each returned addrinfo structure contain the
109 * corresponding arguments for a call to socket(2). For each addrinfo
114 * allocated: the addrinfo structures, and the socket address structures
118 * lwres_freeaddrinfo(). ai is a pointer to a struct addrinfo created by
150 /*! \struct addrinfo
152 static struct addrinfo
153 *ai_reverse(struct addrinfo *oai),
154 *ai_clone(struct addrinfo *oai, int family),
157 static int get_local(const char *name, int socktype, struct addrinfo **res);
160 static int add_ipv4(const char *hostname, int flags, struct addrinfo **aip,
162 static int add_ipv6(const char *hostname, int flags, struct addrinfo **aip,
164 static void set_order(int, int (**)(const char *, int, struct addrinfo **,
175 const struct addrinfo *hints, struct addrinfo **res)
180 struct addrinfo *ai, *ai_list;
182 int (*net_order[FOUND_MAX+1])(const char *, int, struct addrinfo **,
501 set_order(int family, int (**net_order)(const char *, int, struct addrinfo **,
560 add_ipv4(const char *hostname, int flags, struct addrinfo **aip,
563 struct addrinfo *ai;
623 add_ipv6(const char *hostname, int flags, struct addrinfo **aip,
626 struct addrinfo *ai;
686 lwres_freeaddrinfo(struct addrinfo *ai) {
687 struct addrinfo *ai_next;
702 get_local(const char *name, int socktype, struct addrinfo **res) {
703 struct addrinfo *ai;
728 * Allocate an addrinfo structure, and a sockaddr structure
737 static struct addrinfo *
739 struct addrinfo *ai;
741 ai = (struct addrinfo *)calloc(1, sizeof(*ai));
759 static struct addrinfo *
760 ai_clone(struct addrinfo *oai, int family) {
761 struct addrinfo *ai;
781 static struct addrinfo *
782 ai_reverse(struct addrinfo *oai) {
783 struct addrinfo *nai, *tai;