| /netbsd-src/sys/external/bsd/ipf/netinet/ |
| H A D | ip_htable.c | 285 iphtable_t htab, *iph, *oiph; in ipf_htable_create() local 311 iph = ipf_htable_exists(softh, unit, op->iplo_name); in ipf_htable_create() 312 if (iph != NULL) { in ipf_htable_create() 313 if ((iph->iph_flags & IPHASH_DELETE) == 0) { in ipf_htable_create() 317 iph->iph_flags &= ~IPHASH_DELETE; in ipf_htable_create() 318 iph->iph_ref++; in ipf_htable_create() 323 KMALLOC(iph, iphtable_t *); in ipf_htable_create() 324 if (iph == NULL) { in ipf_htable_create() 329 *iph = htab; in ipf_htable_create() 343 (void)strncpy(iph->iph_name, name, sizeof(iph->iph_name)); in ipf_htable_create() [all …]
|
| H A D | ip_nat6.c | 2571 i6addr_t ipa, iph; in ipf_nat6_checkout() local 2651 IP6_AND(&ipa, msk, &iph); in ipf_nat6_checkout() 2652 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_maprules_sz); in ipf_nat6_checkout() 2967 i6addr_t ipa, iph; in ipf_nat6_checkin() local 3051 IP6_AND(&ipa, msk, &iph); in ipf_nat6_checkin() 3052 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_rdrrules_sz); in ipf_nat6_checkin()
|
| /netbsd-src/external/bsd/ipf/dist/ |
| H A D | ip_htable.c | 282 iphtable_t htab, *iph, *oiph; local 308 iph = ipf_htable_exists(softh, unit, op->iplo_name); 309 if (iph != NULL) { 310 if ((iph->iph_flags & IPHASH_DELETE) == 0) { 314 iph->iph_flags &= ~IPHASH_DELETE; 315 iph->iph_ref++; 320 KMALLOC(iph, iphtable_t *); 321 if (iph == NULL) { 326 *iph = htab; 344 (void)strncpy(iph->iph_name, name, sizeof(iph->iph_name)); [all …]
|
| H A D | ip_nat6.c | 2626 i6addr_t ipa, iph; local 2704 IP6_AND(&ipa, msk, &iph); 2705 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_maprules_sz); 3026 i6addr_t ipa, iph; local 3104 IP6_AND(&ipa, msk, &iph); 3105 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_rdrrules_sz);
|
| /netbsd-src/external/bsd/ipf/dist/lib/ |
| H A D | load_hash.c | 25 iphtable_t iph; local 36 bzero((char *)&iph, sizeof(iph)); 43 op.iplo_size = sizeof(iph); 44 op.iplo_struct = &iph; 45 iph = *iphp; 57 iph.iph_size = size; 58 iph.iph_table = NULL; 59 iph.iph_list = NULL; 60 iph.iph_ref = 0; 70 strncpy(iph.iph_name, op.iplo_name, sizeof(iph.iph_name) - 1); [all …]
|
| H A D | remove_hash.c | 24 iphtable_t iph; local 34 op.iplo_size = sizeof(iph); 35 op.iplo_struct = &iph; 37 bzero((char *)&iph, sizeof(iph)); 38 iph.iph_unit = iphp->iph_unit; 39 iph.iph_type = iphp->iph_type; 40 strncpy(iph.iph_name, iphp->iph_name, sizeof(iph.iph_name)); 41 iph.iph_flags = iphp->iph_flags;
|
| H A D | printhash.c | 21 iphtable_t iph; local 25 if ((*copyfunc)((char *)hp, (char *)&iph, sizeof(iph))) 28 if ((name != NULL) && strncmp(name, iph.iph_name, FR_GROUPLEN)) 29 return iph.iph_next; 40 sz = iph.iph_size * sizeof(*table); 42 if ((*copyfunc)((char *)iph.iph_table, (char *)table, sz)) 45 for (printed = 0, ipep = iph.iph_list; ipep != NULL; ) { 46 ipep = printhashnode(&iph, ipep, copyfunc, opts, fields); 57 return iph.iph_next;
|
| H A D | printhashnode.c | 13 printhashnode(iph, ipep, copyfunc, opts, fields) in printhashnode() argument 14 iphtable_t *iph; in printhashnode() 28 iph->iph_size); 55 switch (iph->iph_type & ~IPHASH_ANON) 58 if (strncmp(ipe.ipe_group, iph->iph_name,
|
| /netbsd-src/sys/arch/mvme68k/stand/sboot/ |
| H A D | etherfun.c | 115 iph->ip_v = IP_VERSION; in do_send_tftp() 116 iph->ip_hl = IP_HLEN; in do_send_tftp() 117 iph->ip_tos = 0; /* type of service is 0 */ in do_send_tftp() 118 iph->ip_id = 0; /* id field is 0 */ in do_send_tftp() 119 iph->ip_off = IP_DF; in do_send_tftp() 120 iph->ip_ttl = 3; /* time to live is 3 seconds/hops */ in do_send_tftp() 121 iph->ip_p = IPP_UDP; in do_send_tftp() 122 memcpy(iph->ip_src, myip, sizeof(myip)); in do_send_tftp() 123 memcpy(iph->ip_dst, servip, sizeof(servip)); in do_send_tftp() 124 iph->ip_sum = 0; in do_send_tftp() [all …]
|
| H A D | etherfun.h | 111 struct ip *iph = (struct ip *)(buf + sizeof(struct ether_header)); variable
|
| /netbsd-src/external/mpl/dhcp/dist/includes/netinet/ |
| H A D | ip.h | 64 #define IP_V(iph) ((iph)->ip_fvhl >> 4) argument 65 #define IP_HL(iph) (((iph)->ip_fvhl & 0x0F) << 2) argument 66 #define IP_V_SET(iph,x) ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) | ((x) << 4)) argument 67 #define IP_HL_SET(iph,x) ((iph)->ip_fvhl = \ argument 68 ((iph)->ip_fvhl & 0xF0) | (((x) >> 2) & 0x0F))
|
| /netbsd-src/sys/arch/xen/xen/ |
| H A D | xennet_checksum.c | 78 struct ip *iph = NULL; in xennet_checksum_fill() local 112 iph = m_extract(m, ehlen, sizeof(*iph)); in xennet_checksum_fill() 113 if (iph == NULL) { in xennet_checksum_fill() 117 nxt = iph->ip_p; in xennet_checksum_fill() 118 iphlen = iph->ip_hl << 2; in xennet_checksum_fill() 119 iplen = ntohs(iph->ip_len); in xennet_checksum_fill() 149 if (iph) in xennet_checksum_fill() 159 if (iph) in xennet_checksum_fill()
|
| /netbsd-src/sys/netinet6/ |
| H A D | in6_offload.c | 58 struct ip6_hdr *iph; in tcp6_segment() local 74 KASSERT(len >= off + sizeof(*iph) + sizeof(*th)); in tcp6_segment() 76 hlen = off + sizeof(*iph); in tcp6_segment() 82 iph = (void *)(mtod(m, char *) + off); in tcp6_segment() 83 iphlen = sizeof(*iph); in tcp6_segment() 84 KASSERT((iph->ip6_vfc & IPV6_VERSION_MASK) == IPV6_VERSION); in tcp6_segment() 85 KASSERT(iph->ip6_nxt == IPPROTO_TCP); in tcp6_segment() 111 iph = (void *)(mtod(hdr, char *) + off); in tcp6_segment() 112 iph->ip6_plen = htons(thlen + mss); in tcp6_segment() 113 phsum = in6_cksum_phdr(&iph->ip6_src, &iph->ip6_dst, htonl(thlen + mss), in tcp6_segment()
|
| /netbsd-src/sys/netmpls/ |
| H A D | mpls_ttl.c | 318 struct ip *iph; in ip4_check() local 325 iph = mtod(m, struct ip *); in ip4_check() 327 if (iph->ip_v != IPVERSION) in ip4_check() 329 hlen = iph->ip_hl << 2; in ip4_check() 335 iph = mtod(m, struct ip *); in ip4_check() 343 if (IN_MULTICAST(iph->ip_src.s_addr) || in ip4_check() 344 (ntohl(iph->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || in ip4_check() 345 (ntohl(iph->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || in ip4_check() 349 len = ntohs(iph->ip_len); in ip4_check()
|
| /netbsd-src/sys/net/ |
| H A D | if_mpls.c | 534 struct ip *iph; in mpls_unlabel_inet() local 552 iph = mtod(m, struct ip *); in mpls_unlabel_inet() 553 iphlen = iph->ip_hl << 2; in mpls_unlabel_inet() 561 iph = mtod(m, struct ip *); in mpls_unlabel_inet() 573 iph->ip_ttl = ms.shim.ttl; in mpls_unlabel_inet() 577 iph->ip_tos = (iph->ip_tos << 3) >> 3; in mpls_unlabel_inet() 578 iph->ip_tos |= ms.shim.exp << 5; in mpls_unlabel_inet() 582 iph->ip_sum = 0; in mpls_unlabel_inet() 583 iph->ip_sum = in_cksum(m, iphlen); in mpls_unlabel_inet()
|
| /netbsd-src/external/bsd/ipf/dist/tools/ |
| H A D | ippool.c | 269 iphtable_t iph; local 277 bzero((char *)&iph, sizeof(iph)); 304 iph.iph_seed = atoi(optarg); 319 type = gettype(argv[optind], &iph.iph_type); 326 strncpy(iph.iph_name, poolname, sizeof(iph.iph_name)); 327 iph.iph_name[sizeof(iph.iph_name) - 1] = '\0'; 328 iph.iph_unit = role; 339 err = load_hash(&iph, NULL, ioctl); 349 err = remove_hash(&iph, ioctl);
|
| H A D | ipf_y.y | 2348 iphtable_t iph; local 2375 bzero((char *)&iph, sizeof(iph)); 2376 iph.iph_unit = IPL_LOGIPF; 2377 iph.iph_type = IPHASH_LOOKUP; 2378 *iph.iph_name = '\0'; 2380 if (load_hash(&iph, top, ipfioctls[IPL_LOGLOOKUP]) == 0) 2381 sscanf(iph.iph_name, "%u", &num);
|
| /netbsd-src/sys/netinet/ |
| H A D | sctp_pcb.c | 382 struct ip *iph; in sctp_findassociation_ep_asconf() local 390 iph = mtod(m, struct ip *); in sctp_findassociation_ep_asconf() 391 if (iph->ip_v == IPVERSION) { in sctp_findassociation_ep_asconf() 397 sin->sin_addr.s_addr = iph->ip_dst.s_addr ; in sctp_findassociation_ep_asconf() 398 } else if (iph->ip_v == (IPV6_VERSION >> 4)) { in sctp_findassociation_ep_asconf() 1128 struct ip *iph; in sctp_findassociation_addr() local 1136 iph = mtod(m, struct ip *); in sctp_findassociation_addr() 1137 if (iph->ip_v == IPVERSION) { in sctp_findassociation_addr() 1147 from4->sin_addr.s_addr = iph->ip_src.s_addr; in sctp_findassociation_addr() 1148 to4->sin_addr.s_addr = iph->ip_dst.s_addr ; in sctp_findassociation_addr() [all …]
|
| H A D | sctp_output.c | 3112 struct ip *iph; in sctp_are_there_new_addresses() local 3127 iph = mtod(in_initpkt, struct ip *); in sctp_are_there_new_addresses() 3128 if (iph->ip_v == IPVERSION) { in sctp_are_there_new_addresses() 3130 sin4.sin_addr = iph->ip_src; in sctp_are_there_new_addresses() 3132 } else if (iph->ip_v == (IPV6_VERSION >> 4)) { in sctp_are_there_new_addresses() 3260 struct ip *iph; in sctp_send_initiate_ack() local 3397 iph = mtod(init_pkt, struct ip *); in sctp_send_initiate_ack() 3398 if (iph->ip_v == IPVERSION) { in sctp_send_initiate_ack() 3405 sin->sin_addr = iph->ip_src; in sctp_send_initiate_ack() 3442 } else if (iph in sctp_send_initiate_ack() 8041 struct ip *iph, *iph_out; global() local 8486 struct ip *iph; global() local 8955 struct ip *iph, *iph_out; global() local 9096 struct ip *iph; global() local [all...] |
| H A D | sctp_asconf.c | 310 struct ip *iph; in sctp_process_asconf_delete_ip() local 326 iph = mtod(m, struct ip *); in sctp_process_asconf_delete_ip() 327 if (iph->ip_v == IPVERSION) { in sctp_process_asconf_delete_ip() 334 sin->sin_addr.s_addr = iph->ip_src.s_addr; in sctp_process_asconf_delete_ip() 337 else if (iph->ip_v == (IPV6_VERSION >> 4)) { in sctp_process_asconf_delete_ip()
|
| H A D | sctputil.c | 2909 sctp_print_address_pkt(struct ip *iph, struct sctphdr *sh) in sctp_print_address_pkt() argument 2911 if (iph->ip_v == IPVERSION) { in sctp_print_address_pkt() 2917 lsa.sin_addr = iph->ip_src; in sctp_print_address_pkt() 2922 fsa.sin_addr = iph->ip_dst; in sctp_print_address_pkt() 2928 } else if (iph->ip_v == (IPV6_VERSION >> 4)) { in sctp_print_address_pkt() 2932 ip6 = (struct ip6_hdr *)iph; in sctp_print_address_pkt()
|
| H A D | sctp_input.c | 1681 struct ip *iph; in sctp_handle_cookie_echo() local 1701 iph = mtod(m, struct ip *); in sctp_handle_cookie_echo() 1702 if (iph->ip_v == IPVERSION) { in sctp_handle_cookie_echo() 1710 sin_d->sin_addr.s_addr = iph->ip_dst.s_addr ; in sctp_handle_cookie_echo() 1711 } else if (iph->ip_v == (IPV6_VERSION >> 4)) { in sctp_handle_cookie_echo()
|
| /netbsd-src/sys/kern/ |
| H A D | vfs_wapbl.c | 2368 int iph; 2371 iph = (blocklen - offsetof(struct wapbl_wc_inodelist, wc_inodes)) / 2374 KASSERT(iph > 0); in wapbl_transaction_len() 2376 return MAX(1, howmany(wl->wl_inohashcnt, iph)) * blocklen; in wapbl_transaction_len() 2718 int iph; in wapbl_write_inodes() 2720 iph = (blocklen - offsetof(struct wapbl_wc_inodelist, wc_inodes)) / in wapbl_write_inodes() 2731 while (i < wl->wl_inohashcnt && wc->wc_inocnt < iph) { in wapbl_write_inodes() 2356 int iph; wapbl_transaction_inodes_len() local 2702 int iph; wapbl_write_inodes() local
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/config/bpf/ |
| H A D | bpf-helpers.h | 370 int bpf_tcp_check_syncookie (struct bpf_sock *sk, void *iph,
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/bpf/ |
| H A D | bpf-helpers.h | 370 int bpf_tcp_check_syncookie (struct bpf_sock *sk, void *iph,
|