/freebsd/usr.sbin/autofs/ |
H A D | autounmountd.c | 63 struct automounted_fs *af; in automounted_find() local 65 TAILQ_FOREACH(af, &automounted, af_next) { in automounted_find() 66 if (fsidcmp(&af->af_fsid, &fsid) == 0) in automounted_find() 67 return (af); in automounted_find() 76 struct automounted_fs *af; in automounted_add() local 78 af = calloc(1, sizeof(*af)); in automounted_add() 79 if (af == NULL) in automounted_add() 81 af->af_mount_time = time(NULL); in automounted_add() 82 af->af_fsid = fsid; in automounted_add() 83 strlcpy(af->af_mountpoint, mountpoint, sizeof(af->af_mountpoint)); in automounted_add() [all …]
|
/freebsd/cddl/usr.sbin/dwatch/libexec/ |
H A D | sendrecv | 53 inline string address_family_string[sa_family_t af] = 54 af == AF_UNSPEC ? "AF_UNSPEC" : 55 af == AF_LOCAL ? "AF_UNIX" : 56 af == AF_UNIX ? "AF_UNIX" : 57 af == AF_INET ? "AF_INET" : 58 af == AF_IMPLINK ? "AF_IMPLINK" : 59 af == AF_PUP ? "AF_PUP" : 60 af == AF_CHAOS ? "AF_CHAOS" : 61 af == AF_NETBIOS ? "AF_NETBIOS" : 62 af == AF_ISO ? "AF_ISO" : [all …]
|
/freebsd/lib/libthr/thread/ |
H A D | thr_fork.c | 85 struct pthread_atfork *af; in _thr_atfork() local 87 if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) in _thr_atfork() 90 af->prepare = prepare; in _thr_atfork() 91 af->parent = parent; in _thr_atfork() 92 af->child = child; in _thr_atfork() 98 TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); in _thr_atfork() 102 TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); in _thr_atfork() 113 struct pthread_atfork *af, *af1; in __pthread_cxa_finalize() local 120 TAILQ_FOREACH_SAFE(af, &_thr_atfork_list, qe, af1) { in __pthread_cxa_finalize() 121 if (__elf_phdr_match_addr(phdr_info, af->prepare) || in __pthread_cxa_finalize() [all …]
|
/freebsd/crypto/openssh/ |
H A D | addr.c | 36 addr_unicast_masklen(int af) in addr_unicast_masklen() argument 38 switch (af) { in addr_unicast_masklen() 49 masklen_valid(int af, u_int masklen) in masklen_valid() argument 51 switch (af) { in masklen_valid() 71 switch (xa->af) { in addr_xaddr_to_sa() 121 xa->af = AF_INET; in addr_sa_to_xaddr() 127 xa->af = AF_INET6; in addr_sa_to_xaddr() 148 switch (n->af) { in addr_invert() 167 addr_netmask(int af, u_int l, struct xaddr *n) in addr_netmask() argument 171 if (masklen_valid(af, l) != 0 || n == NULL) in addr_netmask() [all …]
|
/freebsd/lib/msun/tests/ |
H A D | nan_test.c | 50 float af[4]; in testnan() local 60 bzero(&af[i], sizeof(float)); in testnan() 65 af[0] = nanf(nan_format); in testnan() 66 ATF_REQUIRE(isnan(af[0])); in testnan() 67 af[1] = strtof(nan_str, &end); in testnan() 69 ATF_REQUIRE(sscanf(nan_str, "%e", &af[2]) == 1); in testnan() 70 ATF_REQUIRE(memcmp(&af[0], &af[1], sizeof(float)) == 0); in testnan() 71 ATF_REQUIRE(memcmp(&af[1], &af[2], sizeof(float)) == 0); in testnan() 74 af[3] = strtof("nan", NULL); in testnan() 75 ATF_REQUIRE(memcmp(&af[2], &af[3], sizeof(float)) == 0); in testnan()
|
/freebsd/sys/nlm/ |
H A D | nlm_prot_impl.c | 568 struct nlm_async_lock *af = (struct nlm_async_lock *) arg; in nlm_lock_callback() local 572 " cookie %d:%d\n", af, af->af_host->nh_caller_name, in nlm_lock_callback() 573 af->af_host->nh_sysid, ng_sysid(&af->af_granted.cookie), in nlm_lock_callback() 574 ng_cookie(&af->af_granted.cookie)); in nlm_lock_callback() 586 if (af->af_host->nh_vers == NLM_VERS4) { in nlm_lock_callback() 587 nlm4_granted_msg_4(&af->af_granted, in nlm_lock_callback() 588 NULL, af->af_rpc, &ext, nlm_zero_tv); in nlm_lock_callback() 594 granted.cookie = af->af_granted.cookie; in nlm_lock_callback() 595 granted.exclusive = af->af_granted.exclusive; in nlm_lock_callback() 597 af->af_granted.alock.caller_name; in nlm_lock_callback() [all …]
|
/freebsd/sbin/pfctl/ |
H A D | pf_print_state.c | 56 print_addr(struct pf_addr_wrap *addr, sa_family_t af, int verbose) in print_addr() argument 90 if (inet_ntop(af, &addr->v.a.addr, buf, sizeof(buf)) == NULL) in print_addr() 94 if (inet_ntop(af, &addr->v.a.mask, buf, sizeof(buf)) == NULL) in print_addr() 107 if (inet_ntop(af, &addr->v.a.addr, buf, in print_addr() 129 int bits = unmask(&addr->v.a.mask, af); in print_addr() 131 if (bits < (af == AF_INET ? 32 : 128)) in print_addr() 137 print_name(struct pf_addr *addr, sa_family_t af) in print_name() argument 142 switch (af) { in print_name() 170 print_host(struct pf_addr *addr, u_int16_t port, sa_family_t af, int opts) in print_host() argument 173 print_name(addr, af); in print_host() [all …]
|
H A D | parse.y | 250 int af; member 469 sa_family_t af; member 541 %type <v.i> no dir af fragcache optimizer syncookie_val 949 anchorrule : ANCHOR anchorname dir quick interface af proto fromto 1007 r.af = $6; 1082 decide_address_family($8.src.host, &r.af); 1083 decide_address_family($8.dst.host, &r.af); 1092 | NATANCHOR string interface af proto fromto rtable { 1102 r.af = $4; 1105 decide_address_family($6.src.host, &r.af); [all …]
|
H A D | pfctl_parser.c | 232 geticmptypebynumber(u_int8_t type, sa_family_t af) in geticmptypebynumber() argument 236 if (af != AF_INET6) { in geticmptypebynumber() 251 geticmptypebyname(char *w, sa_family_t af) in geticmptypebyname() argument 255 if (af != AF_INET6) { in geticmptypebyname() 270 geticmpcodebynumber(u_int8_t type, u_int8_t code, sa_family_t af) in geticmpcodebynumber() argument 274 if (af != AF_INET6) { in geticmpcodebynumber() 291 geticmpcodebyname(u_long type, char *w, sa_family_t af) in geticmpcodebyname() argument 295 if (af != AF_INET6) { in geticmpcodebyname() 381 sa_family_t af, u_int8_t proto, int verbose, int numeric) in print_fromto() argument 398 print_addr(&src->addr, af, verbose); in print_fromto() [all …]
|
/freebsd/usr.bin/netstat/ |
H A D | main.c | 233 static int af; /* address family */ variable 248 af = AF_UNSPEC; in main() 259 af = AF_INET; in main() 266 af = AF_INET6; in main() 300 af = AF_INET; in main() 303 af = AF_INET6; in main() 307 af = PF_KEY; in main() 311 af = AF_UNIX; in main() 315 af = AF_NETGRAPH; in main() 318 af = AF_LINK; in main() [all …]
|
H A D | nhgrp.c | 52 #define WID_GW_DEFAULT(af) (((af) == AF_INET6) ? 40 : 18) argument 193 dump_nhgrp_sysctl(int fibnum, int af, struct nhops_dump *nd) in dump_nhgrp_sysctl() argument 206 mib[3] = af; in dump_nhgrp_sysctl() 212 af, fibnum); in dump_nhgrp_sysctl() 216 xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhgrpdump.%d", af, fibnum); in dump_nhgrp_sysctl() 250 print_nhgrp_sysctl(int fibnum, int af) in print_nhgrp_sysctl() argument 256 dump_nhgrp_sysctl(fibnum, af, &nd); in print_nhgrp_sysctl() 261 wid_gw = WID_GW_DEFAULT(af); in print_nhgrp_sysctl() 263 pr_family(af); in print_nhgrp_sysctl() 266 print_nhgroup_header(af); in print_nhgrp_sysctl() [all …]
|
H A D | nhops.c | 68 #define WID_DST_DEFAULT(af) 18 /* width of destination column */ argument 69 #define WID_GW_DEFAULT(af) 18 /* width of gateway column */ argument 71 #define WID_DST_DEFAULT(af) \ argument 72 ((af) == AF_INET6 ? (numeric_addr ? 33: 18) : 18) 73 #define WID_GW_DEFAULT(af) \ argument 74 ((af) == AF_INET6 ? (numeric_addr ? 29 : 18) : 18) 336 dump_nhops_sysctl(int fibnum, int af, struct nhops_dump *nd) in dump_nhops_sysctl() argument 349 mib[3] = af; in dump_nhops_sysctl() 354 xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d estimate", af, in dump_nhops_sysctl() 359 xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d", af, fibnum); in dump_nhops_sysctl() [all …]
|
/freebsd/lib/libc/net/ |
H A D | gethostbynis.c | 51 _gethostbynis(const char *name, char *map, int af, struct hostent *he, in _gethostbynis() argument 62 switch(af) { in _gethostbynis() 101 switch (af) { in _gethostbynis() 109 af = AF_INET6; in _gethostbynis() 114 addrok = inet_pton(af, result, hed->host_addr); in _gethostbynis() 123 he->h_addrtype = af; in _gethostbynis() 164 _gethostbynisname_r(const char *name, int af, struct hostent *he, in _gethostbynisname_r() argument 169 switch (af) { in _gethostbynisname_r() 177 return (_gethostbynis(name, map, af, he, hed)); in _gethostbynisname_r() 181 _gethostbynisaddr_r(const void *addr, socklen_t len, int af, in _gethostbynisaddr_r() argument [all …]
|
H A D | gethostnamadr.c | 431 fakeaddr(const char *name, int af, struct hostent *hp, char *buf, in fakeaddr() argument 443 if ((af != AF_INET || in fakeaddr() 445 inet_pton(af, name, hed->host_addr) != 1) { in fakeaddr() 451 if (af == AF_INET && (statp->options & RES_USE_INET6) != 0U) { in fakeaddr() 454 af = AF_INET6; in fakeaddr() 456 he.h_addrtype = af; in fakeaddr() 457 switch(af) { in fakeaddr() 508 gethostbyname2_r(const char *name, int af, struct hostent *he, char *buffer, in gethostbyname2_r() argument 518 return (gethostbyname_internal(name, af, he, buffer, buflen, result, in gethostbyname2_r() 523 gethostbyname_internal(const char *name, int af, struct hostent *hp, char *buf, in gethostbyname_internal() argument [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/net/ |
H A D | h_hostent.c | 57 const int af = h->h_length == NS_INADDRSZ ? AF_INET : AF_INET6; in phostent() local 68 printf("%s%s", i == 0 ? "" : " ", inet_ntop(af, in phostent() 115 int c, af, e, byaddr, len; in main() local 120 af = AF_INET; in main() 131 af = AF_INET; in main() 134 af = AF_INET6; in main() 179 af = strchr(*argv, ':') ? AF_INET6 : AF_INET; in main() 180 len = af == AF_INET ? NS_INADDRSZ : NS_IN6ADDRSZ; in main() 181 if (inet_pton(af, *argv, &addr) == -1) in main() 184 geta(gethostbyaddr((const char *)&addr, len, af)); in main() [all …]
|
/freebsd/sys/netpfil/pf/ |
H A D | pf_lb.c | 103 struct pf_poolhashkey *key, sa_family_t af) in pf_hash() argument 107 switch (af) { in pf_hash() 171 else if (r->af && r->af != pd->af) in pf_match_translation() 175 else if (PF_MISMATCHAW(&src->addr, &pd->nsaddr, pd->af, in pf_match_translation() 184 PF_MISMATCHAW(&dst->addr, &pd->ndaddr, pd->af, dst->neg, NULL, in pf_match_translation() 187 else if (xdst != NULL && PF_MISMATCHAW(xdst, &pd->ndaddr, pd->af, in pf_match_translation() 256 udp_source.af = pd->af; in pf_get_sport() 257 PF_ACPY(&udp_source.addr, &pd->nsaddr, pd->af); in pf_get_sport() 262 PF_ACPY(naddr, &(*udp_mapping)->endpoints[1].addr, pd->af); in pf_get_sport() 268 pd->af, sh, sn_type, false); in pf_get_sport() [all …]
|
H A D | pf.c | 205 sa_family_t af; member 265 sa_family_t af; member 460 if (st->rule->rt == PF_REPLYTO || (pd->af != pd->naf)) in BOUND_IFACE() 567 pf_addr_cmp(struct pf_addr *a, struct pf_addr *b, sa_family_t af) in pf_addr_cmp() argument 570 switch (af) { in pf_addr_cmp() 604 pf_is_loopback(sa_family_t af, struct pf_addr *addr) in pf_is_loopback() argument 606 switch (af) { in pf_is_loopback() 614 panic("Unknown af %d", af); in pf_is_loopback() 627 if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af)) in pf_packet_rework_nat() 630 nk->port[pd->sidx], 0, pd->af, pd->naf); in pf_packet_rework_nat() [all …]
|
/freebsd/contrib/tcpdump/ |
H A D | print-enc.c | 77 nd_uint32_t af; member 101 u_int af, flags; in enc_if_print() local 127 UNALIGNED_MEMCPY(&af, &hdr->af, sizeof (af)); in enc_if_print() 129 if ((af & 0xFFFF0000) != 0) { in enc_if_print() 130 af = SWAPLONG(af); in enc_if_print() 146 switch (af) { in enc_if_print()
|
/freebsd/usr.sbin/mtest/ |
H A D | mtest.c | 290 int af, error; in parse_cmd_args() local 296 af = AF_UNSPEC; in parse_cmd_args() 316 af = res->ai_family; in parse_cmd_args() 326 hints.ai_family = af; in parse_cmd_args() 332 if (af != res->ai_family) { in parse_cmd_args() 345 af2sock(const int af, int s, int s6) in af2sock() argument 349 if (af == AF_INET) in af2sock() 353 if (af == AF_INET6) in af2sock() 360 af2socklen(const int af) in af2socklen() argument 364 if (af == AF_INET) in af2socklen() [all …]
|
/freebsd/contrib/wpa/src/utils/ |
H A D | ip_addr.c | 20 if (addr->af == AF_INET) { in hostapd_ip_txt() 26 if (addr->af == AF_INET6) { in hostapd_ip_txt() 40 addr->af = AF_INET; in hostapd_parse_ip_addr() 46 addr->af = AF_INET6; in hostapd_parse_ip_addr() 59 if (a->af != b->af) in hostapd_ip_equal() 62 if (a->af == AF_INET && a->u.v4.s_addr == b->u.v4.s_addr) in hostapd_ip_equal() 66 if (a->af == AF_INET6 && in hostapd_ip_equal()
|
/freebsd/contrib/unbound/ipset/ |
H A D | ipset.c | 86 static int add_to_ipset(filter_dev dev, const char *setname, const void *ipaddr, int af) { in add_to_ipset() argument 120 switch (af) { in add_to_ipset() 133 addr.pfra_af = af; in add_to_ipset() 142 static int add_to_ipset(filter_dev dev, const char *setname, const void *ipaddr, int af) { in add_to_ipset() argument 152 if (af != AF_INET && af != AF_INET6) { in add_to_ipset() 162 nfg->nfgen_family = af; in add_to_ipset() 170 mnl_attr_put(nlh, (af == AF_INET ? IPSET_ATTR_IPADDR_IPV4 : IPSET_ATTR_IPADDR_IPV6) in add_to_ipset() 171 …| NLA_F_NET_BYTEORDER, (af == AF_INET ? sizeof(struct in_addr) : sizeof(struct in6_addr)), ipaddr); in add_to_ipset() 184 struct packed_rrset_data *d, const char* setname, int af, in ipset_add_rrset_data() argument 197 if(af == AF_INET && rd_len != INET_SIZE) in ipset_add_rrset_data() [all …]
|
/freebsd/sys/net/ |
H A D | if_gif.c | 101 void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); 102 void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); 291 uint32_t af; in gif_transmit() local 314 /* Now pull back the af that we stashed in the csum_data. */ in gif_transmit() 316 af = AF_LINK; in gif_transmit() 318 af = m->m_pkthdr.csum_data; in gif_transmit() 321 BPF_MTAP2(ifp, &af, sizeof(af), m); in gif_transmit() 326 switch (af) { in gif_transmit() 406 uint32_t af; in gif_output() local 437 int isr, n, af; gif_input() local [all...] |
/freebsd/sys/netipsec/ |
H A D | ipsec_input.c | 120 ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto) in ipsec_common_input() 170 dst_address.sa.sa_family = af; in ipsec_common_input() 171 switch (af) { in ipsec_common_input() 196 DPRINTF(("%s: unsupported protocol family %u\n", __func__, af)); in ipsec_common_input() 351 int error, prot, af, sproto, isr_prot; in ipsec4_common_input_cb() 356 af = saidx->dst.sa.sa_family; in ipsec4_common_input_cb() 357 IPSEC_ASSERT(af == AF_INET, ("unexpected af %u", af)); in ipsec4_common_input_cb() 473 af in ipsec4_common_input_cb() 119 ipsec_common_input(struct mbuf * m,int skip,int protoff,int af,int sproto) ipsec_common_input() argument 345 int error, prot, af, sproto, isr_prot; ipsec4_common_input_cb() local 591 int prot, af, sproto; ipsec6_common_input_cb() local [all...] |
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | port-net.c | 319 u_int32_t af; in sys_tun_infilter() local 332 af = iph.ip_v == 6 ? OPENBSD_AF_INET6 : OPENBSD_AF_INET; in sys_tun_infilter() 336 POKE_U32(rbuf, af); in sys_tun_infilter() 342 af = PEEK_U32(buf); in sys_tun_infilter() 344 POKE_U32(buf, af == AF_INET6 ? OPENBSD_AF_INET6 : OPENBSD_AF_INET); in sys_tun_infilter() 357 u_int32_t af; in sys_tun_outfilter() local 363 if (*dlen < sizeof(af)) in sys_tun_outfilter() 369 *dlen -= sizeof(af); in sys_tun_outfilter() 370 buf = *data + sizeof(af); in sys_tun_outfilter() 373 af = (PEEK_U32(buf) == OPENBSD_AF_INET6) ? AF_INET6 : AF_INET; in sys_tun_outfilter() [all …]
|
H A D | bindresvport.c | 56 int error, af; in bindresvport_sa() local 73 af = sa->sa_family; in bindresvport_sa() 76 af = sa->sa_family; in bindresvport_sa() 78 if (af == AF_INET) { in bindresvport_sa() 82 } else if (af == AF_INET6) { in bindresvport_sa() 90 sa->sa_family = af; in bindresvport_sa()
|