| /freebsd-13.1/sys/netpfil/ipfilter/netinet/ |
| H A D | ip_htable.c | 335 iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_create() 343 bzero((char *)iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_create() 351 iph->iph_tail = &iph->iph_list; in ipf_htable_create() 454 iph->iph_next->iph_pnext = iph->iph_pnext; in ipf_htable_free() 456 *iph->iph_pnext = iph->iph_next; in ipf_htable_free() 462 KFREES(iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_free() 485 *iph->iph_pnext = iph->iph_next; in ipf_htable_remove() 487 iph->iph_next->iph_pnext = iph->iph_pnext; in ipf_htable_remove() 691 iph = iph->iph_next) { in ipf_htable_exists() 701 iph = iph->iph_next) { in ipf_htable_exists() [all …]
|
| /freebsd-13.1/sbin/ipf/libipf/ |
| H A D | load_hash.c | 22 iphtable_t iph; in load_hash() local 33 bzero((char *)&iph, sizeof(iph)); in load_hash() 41 op.iplo_struct = &iph; in load_hash() 42 iph = *iphp; in load_hash() 54 iph.iph_size = size; in load_hash() 55 iph.iph_table = NULL; in load_hash() 56 iph.iph_list = NULL; in load_hash() 57 iph.iph_ref = 0; in load_hash() 71 iph.iph_table = calloc(size, sizeof(*iph.iph_table)); in load_hash() 76 iph.iph_list = list; in load_hash() [all …]
|
| H A D | remove_hash.c | 22 iphtable_t iph; in remove_hash() local 32 op.iplo_size = sizeof(iph); in remove_hash() 33 op.iplo_struct = &iph; in remove_hash() 35 bzero((char *)&iph, sizeof(iph)); in remove_hash() 36 iph.iph_unit = iphp->iph_unit; in remove_hash() 37 iph.iph_type = iphp->iph_type; in remove_hash() 38 strncpy(iph.iph_name, iphp->iph_name, sizeof(iph.iph_name)); in remove_hash() 39 iph.iph_flags = iphp->iph_flags; in remove_hash()
|
| H A D | printhash.c | 17 iphtable_t iph; in printhash() local 21 if ((*copyfunc)((char *)hp, (char *)&iph, sizeof(iph))) in printhash() 24 if ((name != NULL) && strncmp(name, iph.iph_name, FR_GROUPLEN)) in printhash() 25 return (iph.iph_next); in printhash() 36 sz = iph.iph_size * sizeof(*table); in printhash() 38 if ((*copyfunc)((char *)iph.iph_table, (char *)table, sz)) in printhash() 41 for (printed = 0, ipep = iph.iph_list; ipep != NULL; ) { in printhash() 42 ipep = printhashnode(&iph, ipep, copyfunc, opts, fields); in printhash() 53 return (iph.iph_next); in printhash()
|
| H A D | printhashnode.c | 13 printhashnode(iphtable_t *iph, iphtent_t *ipep, copyfunc_t copyfunc, int opts, argument 24 iph->iph_size); 80 switch (iph->iph_type & ~IPHASH_ANON) 83 if (strncmp(ipe.ipe_group, iph->iph_name,
|
| /freebsd-13.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-13.1/tools/tools/netmap/ |
| H A D | pkt_hash.c | 153 if (iph->ip_hl < 5 || iph->ip_hl * 4 > iph->ip_len) { in decode_ip_n_hash() 156 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), in decode_ip_n_hash() 157 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 164 switch (iph->ip_p) { in decode_ip_n_hash() 166 tcph = (const struct tcphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 168 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 173 udph = (const struct udphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 175 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 181 rc = decode_ip_n_hash((const struct ip *)((const uint8_t *)iph + (iph->ip_hl<<2)), in decode_ip_n_hash() 185 rc = decode_gre_hash((const uint8_t *)iph + (iph->ip_hl<<2), in decode_ip_n_hash() [all …]
|
| /freebsd-13.1/contrib/wpa/src/ap/ |
| H A D | fils_hlp.c | 161 struct ip *iph; in fils_dhcp_handler() local 261 iph = wpabuf_put(resp, sizeof(*iph)); in fils_dhcp_handler() 262 iph->ip_v = 4; in fils_dhcp_handler() 263 iph->ip_hl = sizeof(*iph) / 4; in fils_dhcp_handler() 264 iph->ip_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 265 iph->ip_ttl = 1; in fils_dhcp_handler() 269 iph->ip_sum = ip_checksum(iph, sizeof(*iph)); in fils_dhcp_handler() 482 const struct ip *iph; in fils_process_hlp_udp() local 519 if (ip_checksum(iph, sizeof(*iph)) != 0) { in fils_process_hlp_ip() 529 iph->ip_src.s_addr, iph->ip_dst.s_addr, iph->ip_p); in fils_process_hlp_ip() [all …]
|
| H A D | dhcp_snoop.c | 49 ip_len = ntohs(b->iph.ip_len); in handle_dhcp()
|
| /freebsd-13.1/sys/dev/sfxge/ |
| H A D | sfxge_rx.c | 387 struct ip *iph = c->nh; in sfxge_lro_deliver() local 388 iph->ip_len = htons(iph->ip_len); in sfxge_lro_deliver() 389 iph->ip_sum = 0; in sfxge_lro_deliver() 390 iph->ip_sum = in_cksum_hdr(iph); in sfxge_lro_deliver() 396 iph->ip6_plen = htons(iph->ip6_plen); in sfxge_lro_deliver() 513 struct ip *iph = nh; in sfxge_lro_start() local 514 iph->ip_len = ntohs(iph->ip_len); in sfxge_lro_start() 517 iph->ip6_plen = ntohs(iph->ip6_plen); in sfxge_lro_start() 538 pkt_length = ntohs(iph->ip_len) + (char *) iph - eh; in sfxge_lro_try_merge() 707 struct ip *iph = nh; in sfxge_lro() local [all …]
|
| /freebsd-13.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 | 251 uint16_t nm_os_csum_ipv4(struct nm_iphdr *iph) in nm_os_csum_ipv4() argument 254 return in_cksum_hdr((void *)iph); in nm_os_csum_ipv4() 256 return nm_os_csum_fold(nm_os_csum_raw((uint8_t*)iph, sizeof(struct nm_iphdr), 0)); in nm_os_csum_ipv4() 261 nm_os_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, in nm_os_csum_tcpudp_ipv4() argument 265 uint16_t pseudolen = datalen + iph->protocol; in nm_os_csum_tcpudp_ipv4() 268 *check = in_pseudo(iph->saddr, iph->daddr, in nm_os_csum_tcpudp_ipv4()
|
| /freebsd-13.1/sys/compat/linuxkpi/common/include/linux/ |
| H A D | ip.h | 66 ip_send_check(struct iphdr *iph) in ip_send_check() argument 70 iph->check = 0; in ip_send_check() 72 iph->check = in_cksum_hdr((const void *)iph); in ip_send_check()
|
| /freebsd-13.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-13.1/crypto/openssh/openbsd-compat/ |
| H A D | port-net.c | 316 struct ip iph; in sys_tun_infilter() local 328 if (len <= sizeof(iph) || len > sizeof(rbuf) - 4) in sys_tun_infilter() 331 memcpy(&iph, buf, sizeof(iph)); in sys_tun_infilter() 332 af = iph.ip_v == 6 ? OPENBSD_AF_INET6 : OPENBSD_AF_INET; in sys_tun_infilter()
|
| /freebsd-13.1/sbin/ipf/ippool/ |
| H A D | ippool.c | 254 iphtable_t iph; in poolcommand() local 262 bzero((char *)&iph, sizeof(iph)); in poolcommand() 287 iph.iph_seed = atoi(optarg); in poolcommand() 292 type = gettype(optarg, &iph.iph_type); in poolcommand() 325 strncpy(iph.iph_name, poolname, sizeof(iph.iph_name)); in poolcommand() 326 iph.iph_name[sizeof(iph.iph_name) - 1] = '\0'; in poolcommand() 327 iph.iph_unit = role; in poolcommand() 339 err = load_hash(&iph, NULL, ioctl); in poolcommand() 349 err = remove_hash(&iph, ioctl); in poolcommand() 358 err_h = remove_hash(&iph, ioctl); in poolcommand()
|
| /freebsd-13.1/sys/dev/xen/netback/ |
| H A D | netback_unit_tests.c | 2148 struct ip *iph; in xnb_fill_eh_and_ip() local 2164 iph = (struct ip*)(eh + 1); in xnb_fill_eh_and_ip() 2167 iph->ip_tos = 0; in xnb_fill_eh_and_ip() 2169 iph->ip_id = htons(ip_id); in xnb_fill_eh_and_ip() 2171 iph->ip_ttl = 64; in xnb_fill_eh_and_ip() 2172 iph->ip_p = ip_p; in xnb_fill_eh_and_ip() 2190 struct ip *iph; in xnb_add_mbuf_cksum_icmp() local 2256 struct ip *iph; in xnb_add_mbuf_cksum_udp() local 2308 struct ip *iph; in xnb_fill_tcp() local 2361 struct ip *iph; in xnb_add_mbuf_cksum_tcp() local [all …]
|
| H A D | netback.c | 2144 struct ip *iph; in xnb_add_mbuf_cksum() local 2154 iph = (struct ip*)(eh + 1); in xnb_add_mbuf_cksum() 2156 iph->ip_sum = 0; in xnb_add_mbuf_cksum() 2157 iph->ip_sum = in_cksum_hdr(iph); in xnb_add_mbuf_cksum() 2160 switch (iph->ip_p) { in xnb_add_mbuf_cksum() 2164 struct tcphdr *th = (struct tcphdr*)(iph + 1); in xnb_add_mbuf_cksum() 2165 th->th_sum = in_pseudo(iph->ip_src.s_addr, in xnb_add_mbuf_cksum() 2166 iph->ip_dst.s_addr, htons(IPPROTO_TCP + tcplen)); in xnb_add_mbuf_cksum() 2168 sizeof(struct ether_header) + ntohs(iph->ip_len), in xnb_add_mbuf_cksum() 2175 struct udphdr *uh = (struct udphdr*)(iph + 1); in xnb_add_mbuf_cksum() [all …]
|
| /freebsd-13.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()
|
| /freebsd-13.1/sys/dev/fdt/ |
| H A D | fdt_common.h | 67 ihandle_t iph; member
|
| /freebsd-13.1/sys/dev/virtio/mmio/ |
| H A D | virtio_mmio_fdt.c | 124 if (ic->iph == platform_node) { in vtmmio_setup_platform()
|
| /freebsd-13.1/sys/dev/qlnx/qlnxe/ |
| H A D | ecore_iwarp.c | 2014 struct ecore_iphdr *iph; in ecore_iwarp_parse_rx_pkt() local 2054 if (iph->protocol != IPPROTO_TCP) { in ecore_iwarp_parse_rx_pkt() 2057 iph->protocol); in ecore_iwarp_parse_rx_pkt() 2061 cm_info->local_ip[0] = ntohl(iph->daddr); in ecore_iwarp_parse_rx_pkt() 2065 ip_hlen = (iph->ihl)*sizeof(u32); in ecore_iwarp_parse_rx_pkt() 2069 ip6h = (struct ecore_ipv6hdr *)iph; in ecore_iwarp_parse_rx_pkt() 2074 iph->protocol); in ecore_iwarp_parse_rx_pkt() 2099 iph->ihl, tcph->source, tcph->dest); in ecore_iwarp_parse_rx_pkt() 2500 struct ecore_iphdr *iph; in ecore_iwarp_mpa_print_tcp_seq() local 2524 ip_hlen = (iph->ihl)*sizeof(u32); in ecore_iwarp_mpa_print_tcp_seq() [all …]
|
| /freebsd-13.1/sys/dev/altera/pio/ |
| H A D | pio.c | 185 fic->iph = node; in pio_attach()
|
| /freebsd-13.1/contrib/wpa/src/common/ |
| H A D | dhcp.h | 60 struct ip iph; member
|
| /freebsd-13.1/sbin/ipf/common/ |
| H A D | ipf_y.y | 2345 iphtable_t iph; in makehash() local 2372 bzero((char *)&iph, sizeof(iph)); in makehash() 2373 iph.iph_unit = IPL_LOGIPF; in makehash() 2374 iph.iph_type = IPHASH_LOOKUP; in makehash() 2375 *iph.iph_name = '\0'; in makehash() 2377 if (load_hash(&iph, top, ipfioctls[IPL_LOGLOOKUP]) == 0) in makehash() 2378 sscanf(iph.iph_name, "%u", &num); in makehash()
|