| /freebsd-12.1/sys/contrib/ipfilter/netinet/ |
| H A D | ip_htable.c | 350 iph->iph_size * sizeof(*iph->iph_table)); 358 bzero((char *)iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); 366 iph->iph_tail = &iph->iph_list; 481 iph->iph_next->iph_pnext = iph->iph_pnext; 483 *iph->iph_pnext = iph->iph_next; 489 KFREES(iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); 515 *iph->iph_pnext = iph->iph_next; 517 iph->iph_next->iph_pnext = iph->iph_pnext; 737 iph = iph->iph_next) { 747 iph = iph->iph_next) { [all …]
|
| H A D | ip_nat6.c | 2618 i6addr_t ipa, iph; local 2696 IP6_AND(&ipa, msk, &iph); 2697 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_maprules_sz); 3018 i6addr_t ipa, iph; local 3096 IP6_AND(&ipa, msk, &iph); 3097 hv = NAT_HASH_FN6(&iph, 0, softn->ipf_nat_rdrrules_sz);
|
| /freebsd-12.1/contrib/ipfilter/lib/ |
| H A D | load_hash.c | 25 iphtable_t iph; local 36 bzero((char *)&iph, 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; 74 iph.iph_table = calloc(size, sizeof(*iph.iph_table)); 79 iph.iph_list = list; [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); 84 switch (iph->iph_type & ~IPHASH_ANON) 87 if (strncmp(ipe.ipe_group, iph->iph_name,
|
| /freebsd-12.1/tools/tools/net80211/wesside/dics/ |
| H A D | dics.c | 164 struct ip* iph; 179 *ttl = iph->ip_ttl; 231 struct ip* iph; in send_stuff() local 238 iph->ip_hl = 5; in send_stuff() 239 iph->ip_v = 4; in send_stuff() 240 iph->ip_tos = 0; in send_stuff() 243 iph->ip_off = 0; in send_stuff() 246 iph->ip_sum = 0; in send_stuff() 256 iph->ip_sum = in_cksum((unsigned short*)iph, 20); in send_stuff() 269 &iph->ip_src, &iph->ip_dst); in send_stuff() [all …]
|
| /freebsd-12.1/contrib/wpa/src/ap/ |
| H A D | fils_hlp.c | 161 struct iphdr *iph; in fils_dhcp_handler() local 261 iph = wpabuf_put(resp, sizeof(*iph)); in fils_dhcp_handler() 262 iph->version = 4; in fils_dhcp_handler() 263 iph->ihl = sizeof(*iph) / 4; in fils_dhcp_handler() 264 iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 265 iph->ttl = 1; in fils_dhcp_handler() 269 iph->check = ip_checksum(iph, sizeof(*iph)); in fils_dhcp_handler() 482 const struct iphdr *iph; in fils_process_hlp_udp() local 516 if (len < sizeof(*iph)) in fils_process_hlp_ip() 519 if (ip_checksum(iph, sizeof(*iph)) != 0) { in fils_process_hlp_ip() [all …]
|
| H A D | dhcp_snoop.c | 49 tot_len = ntohs(b->iph.tot_len); in handle_dhcp()
|
| /freebsd-12.1/tools/tools/netmap/ |
| H A D | pkt_hash.c | 153 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), in decode_ip_n_hash() 154 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 161 switch (iph->ip_p) { in decode_ip_n_hash() 163 tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 164 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), in decode_ip_n_hash() 165 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 170 udph = (struct udphdr *)((uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 172 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 178 rc = decode_ip_n_hash((struct ip *)((uint8_t *)iph + (iph->ip_hl<<2)), in decode_ip_n_hash() 182 rc = decode_gre_hash((uint8_t *)iph + (iph->ip_hl<<2), in decode_ip_n_hash() [all …]
|
| /freebsd-12.1/sys/dev/sfxge/ |
| H A D | sfxge_rx.c | 388 struct ip *iph = c->nh; in sfxge_lro_deliver() local 389 iph->ip_len = htons(iph->ip_len); in sfxge_lro_deliver() 390 iph->ip_sum = 0; in sfxge_lro_deliver() 391 iph->ip_sum = in_cksum_hdr(iph); in sfxge_lro_deliver() 397 iph->ip6_plen = htons(iph->ip6_plen); in sfxge_lro_deliver() 514 struct ip *iph = nh; in sfxge_lro_start() local 515 iph->ip_len = ntohs(iph->ip_len); in sfxge_lro_start() 518 iph->ip6_plen = ntohs(iph->ip6_plen); in sfxge_lro_start() 539 pkt_length = ntohs(iph->ip_len) + (char *) iph - eh; in sfxge_lro_try_merge() 708 struct ip *iph = nh; in sfxge_lro() local [all …]
|
| H A D | sfxge_tx.c | 831 const struct ip *iph = (const struct ip *)mtodo(mbuf, mbuf->m_pkthdr.l2hlen); in sfxge_parse_tx_packet() local 833 KASSERT(iph->ip_p == IPPROTO_TCP, in sfxge_parse_tx_packet() 835 mbuf->m_pkthdr.l3hlen = mbuf->m_pkthdr.l2hlen + 4 * iph->ip_hl; in sfxge_parse_tx_packet() 836 TSO_MBUF_PACKETID(mbuf) = iph->ip_id; in sfxge_parse_tx_packet()
|
| /freebsd-12.1/sys/dev/netmap/ |
| H A D | netmap_offloadings.c | 77 struct nm_iphdr *iph = (struct nm_iphdr *)(pkt); in gso_fix_segment() local 84 iph->tot_len = htobe16(len); in gso_fix_segment() 88 iph->id = htobe16(be16toh(iph->id) + idx); in gso_fix_segment() 89 nm_prdis("ip identification %u", be16toh(iph->id)); in gso_fix_segment() 92 iph->check = 0; in gso_fix_segment() 93 iph->check = nm_os_csum_ipv4(iph); in gso_fix_segment() 94 nm_prdis("IP csum %x", be16toh(iph->check)); in gso_fix_segment() 128 nm_os_csum_tcpudp_ipv4(iph, check_data, len-iphlen, check); in gso_fix_segment() 296 struct nm_iphdr *iph = (struct nm_iphdr *) in bdg_mismatch_datapath() local 305 iphlen = 4 * (iph->version_ihl & 0x0F); in bdg_mismatch_datapath()
|
| H A D | netmap_freebsd.c | 250 uint16_t nm_os_csum_ipv4(struct nm_iphdr *iph) in nm_os_csum_ipv4() argument 253 return in_cksum_hdr((void *)iph); in nm_os_csum_ipv4() 255 return nm_os_csum_fold(nm_os_csum_raw((uint8_t*)iph, sizeof(struct nm_iphdr), 0)); in nm_os_csum_ipv4() 260 nm_os_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, in nm_os_csum_tcpudp_ipv4() argument 264 uint16_t pseudolen = datalen + iph->protocol; in nm_os_csum_tcpudp_ipv4() 267 *check = in_pseudo(iph->saddr, iph->daddr, in nm_os_csum_tcpudp_ipv4()
|
| /freebsd-12.1/sys/ofed/drivers/infiniband/core/ |
| H A D | ib_ud_header.c | 291 struct ip iph; in ib_ud_ip4_csum() local 293 iph.ip_hl = 5; in ib_ud_ip4_csum() 294 iph.ip_v = 4; in ib_ud_ip4_csum() 295 iph.ip_tos = header->ip4.tos; in ib_ud_ip4_csum() 296 iph.ip_len = header->ip4.tot_len; in ib_ud_ip4_csum() 297 iph.ip_id = header->ip4.id; in ib_ud_ip4_csum() 298 iph.ip_off = header->ip4.frag_off; in ib_ud_ip4_csum() 299 iph.ip_ttl = header->ip4.ttl; in ib_ud_ip4_csum() 300 iph.ip_p = header->ip4.protocol; in ib_ud_ip4_csum() 301 iph.ip_sum = 0; in ib_ud_ip4_csum() [all …]
|
| /freebsd-12.1/crypto/openssh/openbsd-compat/ |
| H A D | port-net.c | 312 struct ip iph; in sys_tun_infilter() local 324 if (len <= sizeof(iph) || len > sizeof(rbuf) - 4) in sys_tun_infilter() 327 memcpy(&iph, buf, sizeof(iph)); in sys_tun_infilter() 328 af = iph.ip_v == 6 ? OPENBSD_AF_INET6 : OPENBSD_AF_INET; in sys_tun_infilter()
|
| /freebsd-12.1/sys/dev/xen/netback/ |
| H A D | netback_unit_tests.c | 2153 struct ip *iph; in xnb_fill_eh_and_ip() local 2169 iph = (struct ip*)(eh + 1); in xnb_fill_eh_and_ip() 2172 iph->ip_tos = 0; in xnb_fill_eh_and_ip() 2174 iph->ip_id = htons(ip_id); in xnb_fill_eh_and_ip() 2176 iph->ip_ttl = 64; in xnb_fill_eh_and_ip() 2177 iph->ip_p = ip_p; in xnb_fill_eh_and_ip() 2195 struct ip *iph; in xnb_add_mbuf_cksum_icmp() local 2261 struct ip *iph; in xnb_add_mbuf_cksum_udp() local 2313 struct ip *iph; in xnb_fill_tcp() local 2366 struct ip *iph; in xnb_add_mbuf_cksum_tcp() local [all …]
|
| H A D | netback.c | 2153 struct ip *iph; in xnb_add_mbuf_cksum() local 2163 iph = (struct ip*)(eh + 1); in xnb_add_mbuf_cksum() 2165 iph->ip_sum = 0; in xnb_add_mbuf_cksum() 2166 iph->ip_sum = in_cksum_hdr(iph); in xnb_add_mbuf_cksum() 2169 switch (iph->ip_p) { in xnb_add_mbuf_cksum() 2173 struct tcphdr *th = (struct tcphdr*)(iph + 1); in xnb_add_mbuf_cksum() 2174 th->th_sum = in_pseudo(iph->ip_src.s_addr, in xnb_add_mbuf_cksum() 2175 iph->ip_dst.s_addr, htons(IPPROTO_TCP + tcplen)); in xnb_add_mbuf_cksum() 2177 sizeof(struct ether_header) + ntohs(iph->ip_len), in xnb_add_mbuf_cksum() 2184 struct udphdr *uh = (struct udphdr*)(iph + 1); in xnb_add_mbuf_cksum() [all …]
|
| /freebsd-12.1/contrib/ipfilter/tools/ |
| H A D | ippool.c | 264 iphtable_t iph; local 272 bzero((char *)&iph, sizeof(iph)); 300 iph.iph_seed = atoi(optarg); 323 type = gettype(argv[optind], &iph.iph_type); 330 strncpy(iph.iph_name, poolname, sizeof(iph.iph_name)); 331 iph.iph_name[sizeof(iph.iph_name) - 1] = '\0'; 332 iph.iph_unit = role; 343 err = load_hash(&iph, NULL, ioctl); 353 err = remove_hash(&iph, ioctl);
|
| H A D | ipf_y.y | 2351 iphtable_t iph; local 2378 bzero((char *)&iph, sizeof(iph)); 2379 iph.iph_unit = IPL_LOGIPF; 2380 iph.iph_type = IPHASH_LOOKUP; 2381 *iph.iph_name = '\0'; 2383 if (load_hash(&iph, top, ipfioctls[IPL_LOGLOOKUP]) == 0) 2384 sscanf(iph.iph_name, "%u", &num);
|
| /freebsd-12.1/sys/dev/beri/virtio/ |
| H A D | virtio_mmio_platform.c | 102 if (ic->iph == pio_node) { in setup_pio() 146 fic->iph = node; in virtio_mmio_platform_attach()
|
| H A D | virtio.c | 212 if (ic->iph == pio_node) { in setup_pio()
|
| /freebsd-12.1/sys/dev/fdt/ |
| H A D | fdt_common.h | 68 ihandle_t iph; member
|
| /freebsd-12.1/sys/dev/altera/pio/ |
| H A D | pio.c | 185 fic->iph = node; in pio_attach()
|
| /freebsd-12.1/contrib/wpa/src/common/ |
| H A D | dhcp.h | 58 struct iphdr iph; member
|