/freebsd/contrib/unbound/iterator/ |
H A D | iter_hints.c | 56 struct iter_hints* hints = (struct iter_hints*)calloc(1, in hints_create() local 58 if(!hints) in hints_create() 60 lock_rw_init(&hints->lock); in hints_create() 61 lock_protect(&hints->lock, &hints->tree, sizeof(hints->tree)); in hints_create() 62 return hints; in hints_create() 78 static void hints_del_tree(struct iter_hints* hints) in hints_del_tree() argument 80 traverse_postorder(&hints->tree, &delhintnode, NULL); in hints_del_tree() 84 hints_delete(struct iter_hints* hints) in hints_delete() argument 86 if(!hints) in hints_delete() 88 lock_rw_destroy(&hints->lock); in hints_delete() [all …]
|
H A D | iter_hints.h | 92 void hints_delete(struct iter_hints* hints); 100 int hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg); 115 struct delegpt* hints_find(struct iter_hints* hints, uint8_t* qname, 125 struct delegpt* hints_find_root(struct iter_hints* hints, 141 int hints_next_root(struct iter_hints* hints, uint16_t* qclass, int nolock); 161 struct iter_hints_stub* hints_lookup_stub(struct iter_hints* hints, 170 size_t hints_get_mem(struct iter_hints* hints); 185 int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp, 198 void hints_delete_stub(struct iter_hints* hints, uint16_t c,
|
/freebsd/usr.sbin/nfsd/ |
H A D | nfsd.c | 112 struct addrinfo hints); 148 struct addrinfo *ai_udp, *ai_tcp, *ai_udp6, *ai_tcp6, hints; in main() local 321 memset(&hints, 0, sizeof hints); in main() 322 hints.ai_flags = AI_PASSIVE; in main() 323 hints.ai_family = AF_INET; in main() 324 hints.ai_socktype = SOCK_DGRAM; in main() 325 hints.ai_protocol = IPPROTO_UDP; in main() 326 ecode = getaddrinfo(NULL, "nfs", &hints, &ai_udp); in main() 345 memset(&hints, 0, sizeof hints); in main() 346 hints.ai_flags = AI_PASSIVE; in main() [all …]
|
/freebsd/contrib/ofed/librdmacm/ |
H A D | addrinfo.c | 145 const struct rdma_addrinfo *hints, in ucma_convert_to_rai() argument 150 if (hints->ai_qp_type) { in ucma_convert_to_rai() 151 rai->ai_qp_type = hints->ai_qp_type; in ucma_convert_to_rai() 163 if (hints->ai_port_space) { in ucma_convert_to_rai() 164 rai->ai_port_space = hints->ai_port_space; in ucma_convert_to_rai() 181 if ((hints->ai_flags & RAI_FAMILY) && (hints->ai_family == AF_IB) && in ucma_convert_to_rai() 182 (hints->ai_flags & RAI_NUMERICHOST)) { in ucma_convert_to_rai() 198 if ((hints->ai_flags & RAI_FAMILY) && (hints->ai_family == AF_IB) && in ucma_convert_to_rai() 199 (hints->ai_flags & RAI_NUMERICHOST)) { in ucma_convert_to_rai() 216 const struct rdma_addrinfo *hints, in ucma_getaddrinfo() argument [all …]
|
/freebsd/contrib/less/ |
H A D | scrsize.c | 55 XSizeHints hints; local 60 if (!XGetWMNormalHints(dpy, window, &hints, &longjunk)) 62 if (!(hints.flags & PResizeInc)) 64 if (hints.width_inc == 0 || hints.height_inc == 0) 66 if (!(hints.flags & (PBaseSize|PMinSize))) 68 if (hints.flags & PBaseSize) 70 win_attributes.width -= hints.base_width; 71 win_attributes.height -= hints.base_height; 74 win_attributes.width -= hints [all...] |
/freebsd/usr.sbin/lpr/common_source/ |
H A D | net.c | 89 struct addrinfo hints, *res, *ai; in getport() local 98 memset(&hints, 0, sizeof(hints)); in getport() 99 hints.ai_family = family; in getport() 100 hints.ai_socktype = SOCK_STREAM; in getport() 101 hints.ai_protocol = 0; in getport() 103 &hints, &res); in getport() 183 struct addrinfo hints, *local_res, *remote_res, *lr, *rr; in checkremote() local 201 memset(&hints, 0, sizeof(hints)); in checkremote() 202 hints.ai_family = family; in checkremote() 203 hints.ai_socktype = SOCK_STREAM; in checkremote() [all …]
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | getaddrinfo.c | 44 const struct addrinfo *hints, in get_port_protocol_socktype() argument 54 if (hints != NULL && hints->ai_protocol != 0) { in get_port_protocol_socktype() 55 struct protoent *protoent = getprotobynumber (hints->ai_protocol); in get_port_protocol_socktype() 64 if (hints != NULL) in get_port_protocol_socktype() 65 *socktype = hints->ai_socktype; in get_port_protocol_socktype() 180 get_null (const struct addrinfo *hints, in get_null() argument 193 if (hints != NULL) in get_null() 194 family = hints->ai_family; in get_null() 196 if (hints && hints->ai_flags & AI_PASSIVE) { in get_null() 274 const struct addrinfo *hints, in get_number() argument [all …]
|
H A D | getaddrinfo_hostspec.c | 49 struct addrinfo hints; in roken_getaddrinfo_hostspec2() local 65 memset(&hints, 0, sizeof(hints)); in roken_getaddrinfo_hostspec2() 67 hints.ai_socktype = socktype; in roken_getaddrinfo_hostspec2() 71 hints.ai_socktype = hstp->socktype; in roken_getaddrinfo_hostspec2() 72 hints.ai_protocol = hstp->protocol; in roken_getaddrinfo_hostspec2() 92 return getaddrinfo (host, portstr, &hints, ai); in roken_getaddrinfo_hostspec2()
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | fake-rfc2553.c | 124 addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints) in malloc_ai() argument 143 if (hints->ai_socktype) in malloc_ai() 144 ai->ai_socktype = hints->ai_socktype; in malloc_ai() 148 if (hints->ai_protocol) in malloc_ai() 149 ai->ai_protocol = hints->ai_protocol; in malloc_ai() 156 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument 166 if (hints && hints->ai_family != AF_UNSPEC && in getaddrinfo() 167 hints->ai_family != AF_INET) in getaddrinfo() 181 if (hints && hints->ai_flags & AI_PASSIVE) { in getaddrinfo() 185 *res = malloc_ai(port, addr, hints); in getaddrinfo() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | socktohost.c | 32 struct addrinfo hints; in socktohost() 57 ZERO(hints); in socktohost() 58 hints.ai_family = AF(sock); in socktohost() 59 hints.ai_protocol = IPPROTO_UDP; in socktohost() 60 hints.ai_socktype = SOCK_DGRAM; in socktohost() 61 hints.ai_flags = 0; in socktohost() 64 a_info = getaddrinfo(pbuf, svc, &hints, &alist); in socktohost() 70 hints.ai_flags = AI_CANONNAME; in socktohost() 72 hints.ai_flags |= AI_ADDRCONFIG; in socktohost() 74 a_info = getaddrinfo(pbuf, svc, &hints, in socktohost() 33 struct addrinfo hints; socktohost() local [all...] |
H A D | ntp_rfc2553.c | 278 const struct addrinfo *hints); 282 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument 305 if (hints != NULL) { in getaddrinfo() 306 ai->ai_flags = hints->ai_flags; in getaddrinfo() 307 ai->ai_family = hints->ai_family; in getaddrinfo() 308 ai->ai_socktype = hints->ai_socktype; in getaddrinfo() 309 ai->ai_protocol = hints->ai_protocol; in getaddrinfo() 311 family = hints->ai_family; in getaddrinfo() 312 socktype = hints->ai_socktype; in getaddrinfo() 313 protocol = hints->ai_protocol; in getaddrinfo() [all …]
|
/freebsd/usr.bin/getaddrinfo/ |
H A D | getaddrinfo.c | 62 struct addrinfo hints = zero_addrinfo; in main() local 70 hints.ai_family = AF_UNSPEC; in main() 71 hints.ai_socktype = 0; in main() 72 hints.ai_protocol = 0; in main() 73 hints.ai_flags = 0; in main() 78 hints.ai_flags |= AI_CANONNAME; in main() 82 if (!parse_af(optarg, &hints.ai_family)) { in main() 89 hints.ai_flags |= AI_NUMERICHOST; in main() 93 hints.ai_flags |= AI_NUMERICSERV; in main() 101 if (!parse_protocol(optarg, &hints.ai_protocol)) { in main() [all …]
|
/freebsd/contrib/unbound/compat/ |
H A D | fake-rfc2553.c | 119 addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints) in malloc_ai() argument 136 if (hints->ai_socktype) in malloc_ai() 137 ai->ai_socktype = hints->ai_socktype; in malloc_ai() 141 if (hints->ai_protocol) in malloc_ai() 142 ai->ai_protocol = hints->ai_protocol; in malloc_ai() 149 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument 171 if (hints && hints->ai_flags & AI_PASSIVE) { in getaddrinfo() 175 *res = malloc_ai(port, addr, hints); in getaddrinfo() 182 *res = malloc_ai(port, htonl(0x7f000001), hints); in getaddrinfo() 189 *res = malloc_ai(port, in.s_addr, hints); in getaddrinfo() [all …]
|
/freebsd/contrib/ldns/compat/ |
H A D | fake-rfc2553.c | 121 addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints) in malloc_ai() argument 140 if (hints->ai_socktype) in malloc_ai() 141 ai->ai_socktype = hints->ai_socktype; in malloc_ai() 145 if (hints->ai_protocol) in malloc_ai() 146 ai->ai_protocol = hints->ai_protocol; in malloc_ai() 153 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument 175 if (hints && hints->ai_flags & AI_PASSIVE) { in getaddrinfo() 179 *res = malloc_ai(port, addr, hints); in getaddrinfo() 186 *res = malloc_ai(port, htonl(0x7f000001), hints); in getaddrinfo() 193 *res = malloc_ai(port, in.s_addr, hints); in getaddrinfo() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_util.c | 1001 struct evutil_addrinfo hints; in test_evutil_getaddrinfo() local 1005 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() 1006 hints.ai_family = PF_UNSPEC; in test_evutil_getaddrinfo() 1007 hints.ai_socktype = SOCK_STREAM; in test_evutil_getaddrinfo() 1008 r = evutil_getaddrinfo("1.2.3.4", "8080", &hints, &ai); in test_evutil_getaddrinfo() 1016 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() 1017 hints.ai_family = PF_UNSPEC; in test_evutil_getaddrinfo() 1018 hints.ai_protocol = IPPROTO_UDP; in test_evutil_getaddrinfo() 1019 r = evutil_getaddrinfo("1001:b0b::f00f", "4321", &hints, &ai); in test_evutil_getaddrinfo() 1028 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_util.c | 1001 struct evutil_addrinfo hints; in test_evutil_getaddrinfo() local 1005 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() 1006 hints.ai_family = PF_UNSPEC; in test_evutil_getaddrinfo() 1007 hints.ai_socktype = SOCK_STREAM; in test_evutil_getaddrinfo() 1008 r = evutil_getaddrinfo("1.2.3.4", "8080", &hints, &ai); in test_evutil_getaddrinfo() 1016 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() 1017 hints.ai_family = PF_UNSPEC; in test_evutil_getaddrinfo() 1018 hints.ai_protocol = IPPROTO_UDP; in test_evutil_getaddrinfo() 1019 r = evutil_getaddrinfo("1001:b0b::f00f", "4321", &hints, &ai); in test_evutil_getaddrinfo() 1028 memset(&hints, 0, sizeof(hints)); in test_evutil_getaddrinfo() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | evutil.c | 833 const struct evutil_addrinfo *hints) in evutil_new_addrinfo_() argument 836 EVUTIL_ASSERT(hints); in evutil_new_addrinfo_() 838 if (hints->ai_socktype == 0 && hints->ai_protocol == 0) { in evutil_new_addrinfo_() 842 memcpy(&tmp, hints, sizeof(tmp)); in evutil_new_addrinfo_() 867 res->ai_socktype = hints->ai_socktype; in evutil_new_addrinfo_() 868 res->ai_protocol = hints->ai_protocol; in evutil_new_addrinfo_() 907 const struct evutil_addrinfo *hints) in evutil_parse_servname() argument 913 if (!(hints->ai_flags & EVUTIL_AI_NUMERICSERV)) { in evutil_parse_servname() 952 evutil_getaddrinfo_infer_protocols(struct evutil_addrinfo *hints) in evutil_getaddrinfo_infer_protocols() argument 955 if (!hints->ai_protocol && hints->ai_socktype) { in evutil_getaddrinfo_infer_protocols() [all …]
|
/freebsd/contrib/libevent/ |
H A D | evutil.c | 833 const struct evutil_addrinfo *hints) in evutil_new_addrinfo_() argument 836 EVUTIL_ASSERT(hints); in evutil_new_addrinfo_() 838 if (hints->ai_socktype == 0 && hints->ai_protocol == 0) { in evutil_new_addrinfo_() 842 memcpy(&tmp, hints, sizeof(tmp)); in evutil_new_addrinfo_() 867 res->ai_socktype = hints->ai_socktype; in evutil_new_addrinfo_() 868 res->ai_protocol = hints->ai_protocol; in evutil_new_addrinfo_() 907 const struct evutil_addrinfo *hints) in evutil_parse_servname() argument 913 if (!(hints->ai_flags & EVUTIL_AI_NUMERICSERV)) { in evutil_parse_servname() 952 evutil_getaddrinfo_infer_protocols(struct evutil_addrinfo *hints) in evutil_getaddrinfo_infer_protocols() argument 955 if (!hints->ai_protocol && hints->ai_socktype) { in evutil_getaddrinfo_infer_protocols() [all …]
|
/freebsd/usr.sbin/rpc.statd/ |
H A D | statd.c | 328 struct addrinfo hints, *res = NULL; in create_service() local 354 memset(&hints, 0, sizeof hints); in create_service() 355 hints.ai_family = si.si_af; in create_service() 356 hints.ai_socktype = si.si_socktype; in create_service() 357 hints.ai_protocol = si.si_proto; in create_service() 370 hints.ai_flags = AI_PASSIVE; in create_service() 380 switch (hints.ai_family) { in create_service() 384 hints.ai_flags |= AI_NUMERICHOST; in create_service() 399 hints.ai_flags |= AI_NUMERICHOST; in create_service() 424 res->ai_flags = hints.ai_flags; in create_service() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | nametoaddr.c | 200 struct addrinfo hints, *res; in pcap_nametoaddrinfo() local 203 memset(&hints, 0, sizeof(hints)); in pcap_nametoaddrinfo() 204 hints.ai_family = PF_UNSPEC; in pcap_nametoaddrinfo() 205 hints.ai_socktype = SOCK_STREAM; /*not really*/ in pcap_nametoaddrinfo() 206 hints.ai_protocol = IPPROTO_TCP; /*not really*/ in pcap_nametoaddrinfo() 207 error = getaddrinfo(name, NULL, &hints, &res); in pcap_nametoaddrinfo() 326 struct addrinfo hints, *res, *ai; in pcap_nametoport() local 339 memset(&hints, 0, sizeof(hints)); in pcap_nametoport() 340 hints.ai_family = PF_UNSPEC; in pcap_nametoport() 341 hints.ai_socktype = SOCK_STREAM; in pcap_nametoport() [all …]
|
/freebsd/contrib/tcp_wrappers/ |
H A D | scaffold.c | 84 struct addrinfo hints, *res; in find_inet_addr() local 86 memset(&hints, 0, sizeof(hints)); in find_inet_addr() 87 hints.ai_family = PF_UNSPEC; in find_inet_addr() 88 hints.ai_socktype = SOCK_STREAM; in find_inet_addr() 89 hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; in find_inet_addr() 90 if (getaddrinfo(host, NULL, &hints, &res) == 0) in find_inet_addr() 93 memset(&hints, 0, sizeof(hints)); in find_inet_addr() 94 hints.ai_family = PF_UNSPEC; in find_inet_addr() 95 hints.ai_socktype = SOCK_STREAM; in find_inet_addr() 96 hints.ai_flags = AI_PASSIVE | AI_CANONNAME; in find_inet_addr() [all …]
|
H A D | hosts_access.c | 347 struct addrinfo hints, *res; in string_match() local 356 memset(&hints, 0, sizeof(hints)); in string_match() 357 hints.ai_family = AF_INET6; in string_match() 358 hints.ai_socktype = SOCK_STREAM; in string_match() 359 hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; in string_match() 360 if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) { in string_match() 365 if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0) in string_match() 426 struct addrinfo hints, *res; in masked_match6() local 432 memset(&hints, 0, sizeof(hints)); in masked_match6() 433 hints.ai_family = AF_INET6; in masked_match6() [all …]
|
H A D | socket.c | 171 struct addrinfo hints, *res, *res0 = NULL; in sock_hostname() local 213 memset(&hints, 0, sizeof(hints)); in sock_hostname() 214 hints.ai_family = sin->sa_family; in sock_hostname() 215 hints.ai_socktype = SOCK_STREAM; in sock_hostname() 216 hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST; in sock_hostname() 217 if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) { in sock_hostname() 242 memset(&hints, 0, sizeof(hints)); in sock_hostname() 243 hints.ai_family = sin->sa_family; in sock_hostname() 244 hints.ai_socktype = SOCK_STREAM; in sock_hostname() 245 hints.ai_flags = AI_PASSIVE | AI_CANONNAME; in sock_hostname() [all …]
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | expand_hostname.c | 71 struct addrinfo *ai, *a, hints; in krb5_expand_hostname() local 77 memset (&hints, 0, sizeof(hints)); in krb5_expand_hostname() 78 hints.ai_flags = AI_CANONNAME; in krb5_expand_hostname() 80 error = getaddrinfo (orig_hostname, NULL, &hints, &ai); in krb5_expand_hostname() 149 struct addrinfo *ai, *a, hints; in krb5_expand_hostname_realms() local 157 memset (&hints, 0, sizeof(hints)); in krb5_expand_hostname_realms() 158 hints.ai_flags = AI_CANONNAME; in krb5_expand_hostname_realms() 160 error = getaddrinfo (orig_hostname, NULL, &hints, &ai); in krb5_expand_hostname_realms()
|
/freebsd/contrib/netbsd-tests/net/net/ |
H A D | t_udp.c | 19 struct addrinfo hints; in sendit() local 25 memset(&hints, 0, sizeof(hints)); in sendit() 26 hints.ai_family = family; in sendit() 27 hints.ai_socktype = SOCK_DGRAM; in sendit() 28 hints.ai_protocol = IPPROTO_UDP; in sendit() 29 hints.ai_flags = 0; in sendit() 31 e = getaddrinfo("localhost", "9999", &hints, &res); in sendit()
|