| /freebsd-14.2/sys/netpfil/ipfilter/netinet/ |
| H A D | ip_htable.c | 332 iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_create() 340 bzero((char *)iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_create() 348 iph->iph_tail = &iph->iph_list; in ipf_htable_create() 451 iph->iph_next->iph_pnext = iph->iph_pnext; in ipf_htable_free() 453 *iph->iph_pnext = iph->iph_next; in ipf_htable_free() 459 KFREES(iph->iph_table, iph->iph_size * sizeof(*iph->iph_table)); in ipf_htable_free() 482 *iph->iph_pnext = iph->iph_next; in ipf_htable_remove() 484 iph->iph_next->iph_pnext = iph->iph_pnext; in ipf_htable_remove() 688 iph = iph->iph_next) { in ipf_htable_exists() 698 iph = iph->iph_next) { in ipf_htable_exists() [all …]
|
| /freebsd-14.2/sbin/ipf/libipf/ |
| H A D | load_hash.c | 21 iphtable_t iph; in load_hash() local 32 bzero((char *)&iph, sizeof(iph)); in load_hash() 40 op.iplo_struct = &iph; in load_hash() 41 iph = *iphp; in load_hash() 53 iph.iph_size = size; in load_hash() 54 iph.iph_table = NULL; in load_hash() 55 iph.iph_list = NULL; in load_hash() 56 iph.iph_ref = 0; in load_hash() 70 iph.iph_table = calloc(size, sizeof(*iph.iph_table)); in load_hash() 75 iph.iph_list = list; in load_hash() [all …]
|
| H A D | remove_hash.c | 21 iphtable_t iph; in remove_hash() local 31 op.iplo_size = sizeof(iph); in remove_hash() 32 op.iplo_struct = &iph; in remove_hash() 34 bzero((char *)&iph, sizeof(iph)); in remove_hash() 35 iph.iph_unit = iphp->iph_unit; in remove_hash() 36 iph.iph_type = iphp->iph_type; in remove_hash() 37 strncpy(iph.iph_name, iphp->iph_name, sizeof(iph.iph_name)); in remove_hash() 38 iph.iph_flags = iphp->iph_flags; in remove_hash()
|
| H A D | printhash.c | 16 iphtable_t iph; in printhash() local 20 if ((*copyfunc)((char *)hp, (char *)&iph, sizeof(iph))) in printhash() 23 if ((name != NULL) && strncmp(name, iph.iph_name, FR_GROUPLEN)) in printhash() 24 return (iph.iph_next); in printhash() 35 sz = iph.iph_size * sizeof(*table); in printhash() 37 if ((*copyfunc)((char *)iph.iph_table, (char *)table, sz)) in printhash() 40 for (printed = 0, ipep = iph.iph_list; ipep != NULL; ) { in printhash() 41 ipep = printhashnode(&iph, ipep, copyfunc, opts, fields); in printhash() 52 return (iph.iph_next); in printhash()
|
| H A D | printhashnode.c | 12 printhashnode(iphtable_t *iph, iphtent_t *ipep, copyfunc_t copyfunc, int opts, argument 23 iph->iph_size); 79 switch (iph->iph_type & ~IPHASH_ANON) 82 if (strncmp(ipe.ipe_group, iph->iph_name,
|
| /freebsd-14.2/tools/tools/net80211/wesside/dics/ |
| H A D | dics.c | 162 struct ip* iph; 177 *ttl = iph->ip_ttl; 229 struct ip* iph; in send_stuff() local 236 iph->ip_hl = 5; in send_stuff() 237 iph->ip_v = 4; in send_stuff() 238 iph->ip_tos = 0; in send_stuff() 241 iph->ip_off = 0; in send_stuff() 244 iph->ip_sum = 0; in send_stuff() 254 iph->ip_sum = in_cksum((unsigned short*)iph, 20); in send_stuff() 267 &iph->ip_src, &iph->ip_dst); in send_stuff() [all …]
|
| /freebsd-14.2/tools/tools/netmap/ |
| H A D | pkt_hash.c | 152 if (iph->ip_hl < 5 || iph->ip_hl * 4 > iph->ip_len) { in decode_ip_n_hash() 155 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), in decode_ip_n_hash() 156 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 163 switch (iph->ip_p) { in decode_ip_n_hash() 165 tcph = (const struct tcphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 167 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 172 udph = (const struct udphdr *)((const uint8_t *)iph + (iph->ip_hl<<2)); in decode_ip_n_hash() 174 ntohl(iph->ip_dst.s_addr), in decode_ip_n_hash() 180 rc = decode_ip_n_hash((const struct ip *)((const uint8_t *)iph + (iph->ip_hl<<2)), in decode_ip_n_hash() 184 rc = decode_gre_hash((const uint8_t *)iph + (iph->ip_hl<<2), in decode_ip_n_hash() [all …]
|
| /freebsd-14.2/contrib/tcpdump/ |
| H A D | print-ip-demux.c | 39 uint8_t nh, const u_char *iph) in ip_demux_print() argument 88 sctp_print(ndo, bp, iph, length); in ip_demux_print() 92 dccp_print(ndo, bp, iph, length); in ip_demux_print() 96 tcp_print(ndo, bp, length, iph, fragmented); in ip_demux_print() 100 udp_print(ndo, bp, length, iph, fragmented, ttl_hl); in ip_demux_print() 105 icmp_print(ndo, bp, length, iph, fragmented); in ip_demux_print() 115 icmp6_print(ndo, bp, length, iph, fragmented); in ip_demux_print() 156 ospf_print(ndo, bp, length, iph); in ip_demux_print() 192 pim_print(ndo, bp, length, iph); in ip_demux_print() 199 vrrp_print(ndo, bp, length, iph, ttl_hl, ver); in ip_demux_print() [all …]
|
| /freebsd-14.2/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-14.2/sys/dev/sfxge/ |
| H A D | sfxge_rx.c | 385 struct ip *iph = c->nh; in sfxge_lro_deliver() local 386 iph->ip_len = htons(iph->ip_len); in sfxge_lro_deliver() 387 iph->ip_sum = 0; in sfxge_lro_deliver() 388 iph->ip_sum = in_cksum_hdr(iph); in sfxge_lro_deliver() 394 iph->ip6_plen = htons(iph->ip6_plen); in sfxge_lro_deliver() 511 struct ip *iph = nh; in sfxge_lro_start() local 512 iph->ip_len = ntohs(iph->ip_len); in sfxge_lro_start() 515 iph->ip6_plen = ntohs(iph->ip6_plen); in sfxge_lro_start() 536 pkt_length = ntohs(iph->ip_len) + (char *) iph - eh; in sfxge_lro_try_merge() 705 struct ip *iph = nh; in sfxge_lro() local [all …]
|
| /freebsd-14.2/sys/dev/netmap/ |
| H A D | netmap_offloadings.c | 76 struct nm_iphdr *iph = (struct nm_iphdr *)(pkt); in gso_fix_segment() local 83 iph->tot_len = htobe16(len); in gso_fix_segment() 87 iph->id = htobe16(be16toh(iph->id) + idx); in gso_fix_segment() 88 nm_prdis("ip identification %u", be16toh(iph->id)); in gso_fix_segment() 91 iph->check = 0; in gso_fix_segment() 92 iph->check = nm_os_csum_ipv4(iph); in gso_fix_segment() 93 nm_prdis("IP csum %x", be16toh(iph->check)); in gso_fix_segment() 127 nm_os_csum_tcpudp_ipv4(iph, check_data, len-iphlen, check); in gso_fix_segment() 295 struct nm_iphdr *iph = (struct nm_iphdr *) in bdg_mismatch_datapath() local 304 iphlen = 4 * (iph->version_ihl & 0x0F); in bdg_mismatch_datapath()
|
| H A D | netmap_freebsd.c | 246 uint16_t nm_os_csum_ipv4(struct nm_iphdr *iph) in nm_os_csum_ipv4() argument 249 return in_cksum_hdr((void *)iph); in nm_os_csum_ipv4() 251 return nm_os_csum_fold(nm_os_csum_raw((uint8_t*)iph, sizeof(struct nm_iphdr), 0)); in nm_os_csum_ipv4() 256 nm_os_csum_tcpudp_ipv4(struct nm_iphdr *iph, void *data, in nm_os_csum_tcpudp_ipv4() argument 260 uint16_t pseudolen = datalen + iph->protocol; in nm_os_csum_tcpudp_ipv4() 263 *check = in_pseudo(iph->saddr, iph->daddr, in nm_os_csum_tcpudp_ipv4()
|
| /freebsd-14.2/sys/compat/linuxkpi/common/include/linux/ |
| H A D | ip.h | 64 ip_send_check(struct iphdr *iph) in ip_send_check() argument 68 iph->check = 0; in ip_send_check() 70 iph->check = in_cksum_hdr((const void *)iph); in ip_send_check()
|
| /freebsd-14.2/sys/ofed/drivers/infiniband/core/ |
| H A D | ib_ud_header.c | 289 struct ip iph; in ib_ud_ip4_csum() local 291 iph.ip_hl = 5; in ib_ud_ip4_csum() 292 iph.ip_v = 4; in ib_ud_ip4_csum() 293 iph.ip_tos = header->ip4.tos; in ib_ud_ip4_csum() 294 iph.ip_len = header->ip4.tot_len; in ib_ud_ip4_csum() 295 iph.ip_id = header->ip4.id; in ib_ud_ip4_csum() 296 iph.ip_off = header->ip4.frag_off; in ib_ud_ip4_csum() 297 iph.ip_ttl = header->ip4.ttl; in ib_ud_ip4_csum() 298 iph.ip_p = header->ip4.protocol; in ib_ud_ip4_csum() 299 iph.ip_sum = 0; in ib_ud_ip4_csum() [all …]
|
| /freebsd-14.2/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-14.2/sbin/ipf/ippool/ |
| H A D | ippool.c | 253 iphtable_t iph; in poolcommand() local 261 bzero((char *)&iph, sizeof(iph)); in poolcommand() 286 iph.iph_seed = atoi(optarg); in poolcommand() 291 type = gettype(optarg, &iph.iph_type); in poolcommand() 324 strncpy(iph.iph_name, poolname, sizeof(iph.iph_name)); in poolcommand() 325 iph.iph_name[sizeof(iph.iph_name) - 1] = '\0'; in poolcommand() 326 iph.iph_unit = role; in poolcommand() 338 err = load_hash(&iph, NULL, ioctl); in poolcommand() 348 err = remove_hash(&iph, ioctl); in poolcommand() 357 err_h = remove_hash(&iph, ioctl); in poolcommand()
|
| /freebsd-14.2/sys/dev/xen/netback/ |
| H A D | netback_unit_tests.c | 2140 struct ip *iph; in xnb_fill_eh_and_ip() local 2156 iph = (struct ip*)(eh + 1); in xnb_fill_eh_and_ip() 2159 iph->ip_tos = 0; in xnb_fill_eh_and_ip() 2161 iph->ip_id = htons(ip_id); in xnb_fill_eh_and_ip() 2163 iph->ip_ttl = 64; in xnb_fill_eh_and_ip() 2164 iph->ip_p = ip_p; in xnb_fill_eh_and_ip() 2182 struct ip *iph; in xnb_add_mbuf_cksum_icmp() local 2248 struct ip *iph; in xnb_add_mbuf_cksum_udp() local 2300 struct ip *iph; in xnb_fill_tcp() local 2353 struct ip *iph; in xnb_add_mbuf_cksum_tcp() local [all …]
|
| H A D | netback.c | 2142 struct ip *iph; in xnb_add_mbuf_cksum() local 2152 iph = (struct ip*)(eh + 1); in xnb_add_mbuf_cksum() 2154 iph->ip_sum = 0; in xnb_add_mbuf_cksum() 2155 iph->ip_sum = in_cksum_hdr(iph); in xnb_add_mbuf_cksum() 2158 switch (iph->ip_p) { in xnb_add_mbuf_cksum() 2162 struct tcphdr *th = (struct tcphdr*)(iph + 1); in xnb_add_mbuf_cksum() 2163 th->th_sum = in_pseudo(iph->ip_src.s_addr, in xnb_add_mbuf_cksum() 2164 iph->ip_dst.s_addr, htons(IPPROTO_TCP + tcplen)); in xnb_add_mbuf_cksum() 2166 sizeof(struct ether_header) + ntohs(iph->ip_len), in xnb_add_mbuf_cksum() 2173 struct udphdr *uh = (struct udphdr*)(iph + 1); in xnb_add_mbuf_cksum() [all …]
|
| /freebsd-14.2/sys/dev/irdma/ |
| H A D | irdma_utils.c | 1290 struct ip *iph = (struct ip *)buf->iph; in irdma_ieq_get_qp() local 1293 if (iph->ip_v == 4) { in irdma_ieq_get_qp() 1341 struct ip *iph; in irdma_puda_ieq_get_ah_info() local 1356 iph = (struct ip *)buf->iph; in irdma_puda_ieq_get_ah_info() 1387 struct ip *iph; in irdma_gen1_ieq_update_tcpip_info() local 1396 iph->ip_len = htons(pktsize); in irdma_gen1_ieq_update_tcpip_info() 1431 struct ip *iph; in irdma_gen1_puda_get_tcpip_info() local 1448 buf->iph = mem + buf->maclen; in irdma_gen1_puda_get_tcpip_info() 1449 iph = (struct ip *)buf->iph; in irdma_gen1_puda_get_tcpip_info() 1450 buf->tcph = buf->iph + iphlen; in irdma_gen1_puda_get_tcpip_info() [all …]
|
| H A D | irdma_cm.c | 464 struct ip *iph; in irdma_form_uda_cm_frame() local 515 iph = (struct ip *)buf; in irdma_form_uda_cm_frame() 516 buf += sizeof(*iph); in irdma_form_uda_cm_frame() 535 iph->ip_v = IPVERSION; in irdma_form_uda_cm_frame() 537 iph->ip_tos = cm_node->tos; in irdma_form_uda_cm_frame() 541 iph->ip_off = htons(0x4000); in irdma_form_uda_cm_frame() 542 iph->ip_ttl = 0x40; in irdma_form_uda_cm_frame() 543 iph->ip_p = IPPROTO_TCP; in irdma_form_uda_cm_frame() 3009 struct ip *iph; in irdma_receive_ilq() local 3019 iph = (struct ip *)rbuf->iph; in irdma_receive_ilq() [all …]
|
| /freebsd-14.2/sys/dev/beri/virtio/ |
| H A D | virtio_mmio_platform.c | 100 if (ic->iph == pio_node) { in setup_pio() 144 fic->iph = node; in virtio_mmio_platform_attach()
|
| /freebsd-14.2/sys/dev/fdt/ |
| H A D | fdt_common.h | 65 ihandle_t iph; member
|
| /freebsd-14.2/sys/dev/virtio/mmio/ |
| H A D | virtio_mmio_fdt.c | 119 if (ic->iph == platform_node) { in vtmmio_setup_platform()
|
| /freebsd-14.2/sys/dev/qlnx/qlnxe/ |
| H A D | ecore_iwarp.c | 2012 struct ecore_iphdr *iph; in ecore_iwarp_parse_rx_pkt() local 2052 if (iph->protocol != IPPROTO_TCP) { in ecore_iwarp_parse_rx_pkt() 2055 iph->protocol); in ecore_iwarp_parse_rx_pkt() 2059 cm_info->local_ip[0] = ntohl(iph->daddr); in ecore_iwarp_parse_rx_pkt() 2063 ip_hlen = (iph->ihl)*sizeof(u32); in ecore_iwarp_parse_rx_pkt() 2067 ip6h = (struct ecore_ipv6hdr *)iph; in ecore_iwarp_parse_rx_pkt() 2072 iph->protocol); in ecore_iwarp_parse_rx_pkt() 2097 iph->ihl, tcph->source, tcph->dest); in ecore_iwarp_parse_rx_pkt() 2498 struct ecore_iphdr *iph; in ecore_iwarp_mpa_print_tcp_seq() local 2522 ip_hlen = (iph->ihl)*sizeof(u32); in ecore_iwarp_mpa_print_tcp_seq() [all …]
|