| /freebsd/contrib/unbound/iterator/ |
| H A D | iter_hints.c | 2 * iterator/iter_hints.c - iterative resolver module stub and root hints. 40 * Keep track of stub and root hints, and read those from config. 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 84 hints_delete(struct iter_hints * hints) hints_delete() argument 171 hints_insert(struct iter_hints * hints,uint16_t c,struct delegpt * dp,int noprime) hints_insert() argument 280 read_stubs(struct iter_hints * hints,struct config_file * cfg) read_stubs() argument 310 read_root_hints(struct iter_hints * hints,char * fname) read_root_hints() argument 423 read_root_hints_list(struct iter_hints * hints,struct config_file * cfg) read_root_hints_list() argument 442 hints_apply_cfg(struct iter_hints * hints,struct config_file * cfg) hints_apply_cfg() argument 482 hints_find(struct iter_hints * hints,uint8_t * qname,uint16_t qclass,int nolock) hints_find() argument 499 hints_find_root(struct iter_hints * hints,uint16_t qclass,int nolock) hints_find_root() argument 506 hints_lookup_stub(struct iter_hints * hints,uint8_t * qname,uint16_t qclass,struct delegpt * cache_dp,int nolock) hints_lookup_stub() argument 549 hints_next_root(struct iter_hints * hints,uint16_t * qclass,int nolock) hints_next_root() argument 560 hints_get_mem(struct iter_hints * hints) hints_get_mem() argument 575 hints_add_stub(struct iter_hints * hints,uint16_t c,struct delegpt * dp,int noprime,int nolock) hints_add_stub() argument 596 hints_delete_stub(struct iter_hints * hints,uint16_t c,uint8_t * nm,int nolock) hints_delete_stub() argument [all...] |
| H A D | iter_hints.h | 2 * iterator/iter_hints.h - iterative resolver module stub and root hints. 40 * Keep track of stub and root hints, and read those from config. 52 * Iterator hints structure 71 * Iterator hints for a particular stub. 83 * Create hints 84 * @return new hints or NULL on error. 89 * Delete hints. 90 * @param hints: to delete. 92 void hints_delete(struct iter_hints* hints); 95 * Process hints confi [all...] |
| /freebsd/usr.sbin/nfsd/ |
| H A D | nfsd.c | 115 struct addrinfo hints); 151 struct addrinfo *ai_udp, *ai_tcp, *ai_udp6, *ai_tcp6, hints; in main() local 328 memset(&hints, 0, sizeof hints); in main() 329 hints.ai_flags = AI_PASSIVE; in main() 330 hints.ai_family = AF_INET; in main() 331 hints.ai_socktype = SOCK_DGRAM; in main() 332 hints.ai_protocol = IPPROTO_UDP; in main() 333 ecode = getaddrinfo(NULL, "nfs", &hints, &ai_udp); in main() 352 memset(&hints, 0, sizeof hints); in main() 353 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.min_width; 75 win_attributes.height -= hints.min_height; [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/lib/libc/tests/net/getaddrinfo/ |
| H A D | getaddrinfo.c | 90 static const struct addrinfo hints = { in ATF_TC_BODY() local 97 rv = getaddrinfo(goodname, NULL, &hints, &res); in ATF_TC_BODY() 102 rv = getaddrinfo(goodname_dot, NULL, &hints, &res); in ATF_TC_BODY() 107 rv = getaddrinfo(badname, NULL, &hints, &res); in ATF_TC_BODY() 112 rv = getaddrinfo(badname_dot, NULL, &hints, &res); in ATF_TC_BODY() 121 static const struct addrinfo hints = { in ATF_TC_BODY() local 129 rv = getaddrinfo(goodname, NULL, &hints, &res); in ATF_TC_BODY() 134 rv = getaddrinfo(goodname_dot, NULL, &hints, &res); in ATF_TC_BODY() 143 static const struct addrinfo hints = { in ATF_TC_BODY() local 152 rv = getaddrinfo(goodname, "666", &hints, &res); in ATF_TC_BODY() [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/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 | 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/crypto/krb5/src/lib/krb5/os/ |
| H A D | hostaddr.c | 40 struct addrinfo hints, *ai = NULL, *aip; in k5_os_hostaddr() local 45 memset (&hints, 0, sizeof (hints)); in k5_os_hostaddr() 46 hints.ai_flags = AI_NUMERICHOST | AI_ADDRCONFIG; in k5_os_hostaddr() 51 hints.ai_socktype = SOCK_DGRAM; in k5_os_hostaddr() 53 r = getaddrinfo (name, 0, &hints, &ai); in k5_os_hostaddr() 55 hints.ai_flags &= ~AI_NUMERICHOST; in k5_os_hostaddr() 56 r = getaddrinfo (name, 0, &hints, &ai); in k5_os_hostaddr()
|
| /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()
|