Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 25 of 37) sorted by relevance

12

/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_htable.c261 iphtable_t htab, *iph, *oiph; in ipf_htable_create() local
287 iph = ipf_htable_exists(softh, unit, op->iplo_name); in ipf_htable_create()
288 if (iph != NULL) { in ipf_htable_create()
289 if ((iph->iph_flags & IPHASH_DELETE) == 0) { in ipf_htable_create()
293 iph->iph_flags &= ~IPHASH_DELETE; in ipf_htable_create()
294 iph->iph_ref++; in ipf_htable_create()
299 KMALLOC(iph, iphtable_t *); in ipf_htable_create()
300 if (iph == NULL) { in ipf_htable_create()
305 *iph = htab; in ipf_htable_create()
319 (void)strncpy(iph->iph_name, name, sizeof(iph->iph_name)); in ipf_htable_create()
[all …]
/freebsd/sbin/ipf/libipf/
H A Dload_hash.c21 iphtable_t iph; in load_hash() local
32 bzero((char *)&iph, sizeof(iph)); in load_hash()
39 op.iplo_size = 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()
66 strncpy(iph.iph_name, op.iplo_name, sizeof(op.iplo_name)); in load_hash()
[all …]
H A Dremove_hash.c21 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 Dprinthash.c16 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 Dprinthashnode.c12 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/tools/tools/net80211/wesside/dics/
H A Ddics.c162 struct ip* iph;
168 iph = (struct ip*) buf;
169 uh = (struct udphdr*) ((char*)iph + 20);
176 strcpy(ip, inet_ntoa(iph->ip_src));
177 *ttl = iph->ip_ttl;
229 struct ip* iph; in send_stuff() local
235 iph = (struct ip*) buf; in send_stuff()
236 iph->ip_hl = 5; in send_stuff()
237 iph->ip_v = 4; in send_stuff()
238 iph->ip_tos = 0; in send_stuff()
[all …]
/freebsd/tools/tools/netmap/
H A Dpkt_hash.c148 decode_ip_n_hash(const struct ip *iph, uint8_t hash_split, uint8_t seed) in decode_ip_n_hash() argument
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()
166 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), 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()
173 rc = sym_hash_fn(ntohl(iph->ip_src.s_addr), in decode_ip_n_hash()
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-ip-demux.c39 uint8_t nh, const u_char *iph) in ip_demux_print() argument
65 esp_print(ndo, bp, length, iph, ver, fragmented, ttl_hl); in ip_demux_print()
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()
[all …]
/freebsd/contrib/wpa/src/ap/
H A Dfils_hlp.c161 struct ip *iph; in fils_dhcp_handler() local
254 sizeof(*iph) + sizeof(*udph) + (end - pos) + 2); in fils_dhcp_handler()
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()
266 iph->ip_p = 17; /* UDP */ in fils_dhcp_handler()
267 iph->ip_src.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_handler()
268 iph->ip_dst.s_addr = dhcp->client_ip; in fils_dhcp_handler()
[all …]
H A Ddhcp_snoop.c49 ip_len = ntohs(b->iph.ip_len); in handle_dhcp()
/freebsd/sys/dev/sfxge/
H A Dsfxge_rx.c385 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()
389 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_deliver()
393 struct ip6_hdr *iph = c->nh; in sfxge_lro_deliver() local
394 iph->ip6_plen = htons(iph->ip6_plen); in sfxge_lro_deliver()
395 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_deliver()
478 struct ip *iph = c->nh; in sfxge_lro_merge() local
479 iph->ip_len += mbuf->m_len; in sfxge_lro_merge()
[all …]
/freebsd/sys/dev/netmap/
H A Dnetmap_offloadings.c76 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 Dnetmap_freebsd.c246 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/sys/compat/linuxkpi/common/include/linux/
H A Dip.h64 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/sys/ofed/drivers/infiniband/core/
H A Dib_ud_header.c289 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/crypto/openssh/openbsd-compat/
H A Dport-net.c316 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/sbin/ipf/ippool/
H A Dippool.c253 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/sys/dev/xen/netback/
H A Dnetback_unit_tests.c2141 struct ip *iph; in xnb_fill_eh_and_ip() local
2157 iph = (struct ip*)(eh + 1); in xnb_fill_eh_and_ip()
2158 iph->ip_hl = 0x5; /* 5 dwords == 20 bytes */ in xnb_fill_eh_and_ip()
2159 iph->ip_v = 4; /* IP v4 */ in xnb_fill_eh_and_ip()
2160 iph->ip_tos = 0; in xnb_fill_eh_and_ip()
2161 iph->ip_len = htons(ip_len); in xnb_fill_eh_and_ip()
2162 iph->ip_id = htons(ip_id); in xnb_fill_eh_and_ip()
2163 iph->ip_off = htons(ip_off); in xnb_fill_eh_and_ip()
2164 iph->ip_ttl = 64; in xnb_fill_eh_and_ip()
2165 iph->ip_p = ip_p; in xnb_fill_eh_and_ip()
[all …]
H A Dnetback.c2142 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()
2161 size_t tcplen = ntohs(iph->ip_len) - sizeof(struct ip); 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()
[all …]
/freebsd/sys/dev/irdma/
H A Dirdma_utils.c1290 struct ip *iph = (struct ip *)buf->iph; in irdma_ieq_get_qp() local
1293 if (iph->ip_v == 4) { in irdma_ieq_get_qp()
1294 loc_addr[0] = ntohl(iph->ip_dst.s_addr); in irdma_ieq_get_qp()
1295 rem_addr[0] = ntohl(iph->ip_src.s_addr); in irdma_ieq_get_qp()
1297 ip6h = (struct ip6_hdr *)buf->iph; 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()
1357 ah_info->hop_ttl = iph->ip_ttl; in irdma_puda_ieq_get_ah_info()
1358 ah_info->tc_tos = iph->ip_tos; in irdma_puda_ieq_get_ah_info()
1359 ah_info->dest_ip_addr[0] = ntohl(iph->ip_dst.s_addr); in irdma_puda_ieq_get_ah_info()
[all …]
H A Dirdma_cm.c464 struct ip *iph; in irdma_form_uda_cm_frame() local
494 pktsize = sizeof(*iph) + sizeof(*tcph); in irdma_form_uda_cm_frame()
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()
536 iph->ip_hl = 5; /* 5 * 4Byte words, IP headr len */ in irdma_form_uda_cm_frame()
537 iph->ip_tos = cm_node->tos; in irdma_form_uda_cm_frame()
538 iph->ip_len = htons(pktsize); in irdma_form_uda_cm_frame()
539 iph->ip_id = htons(++cm_node->tcp_cntxt.loc_id); in irdma_form_uda_cm_frame()
541 iph in irdma_form_uda_cm_frame()
3006 struct ip *iph; irdma_receive_ilq() local
[all...]
/freebsd/sys/dev/beri/virtio/
H A Dvirtio_mmio_platform.c99 if (ic->iph == pio_node) { in setup_pio()
143 fic->iph = node; in virtio_mmio_platform_attach()
/freebsd/sys/dev/fdt/
H A Dfdt_common.h65 ihandle_t iph; member
/freebsd/sys/dev/virtio/mmio/
H A Dvirtio_mmio_fdt.c118 if (ic->iph == platform_node) { in vtmmio_setup_platform()
/freebsd/sys/dev/qlnx/qlnxe/
H A Decore_iwarp.c2012 struct ecore_iphdr *iph; in ecore_iwarp_parse_rx_pkt() local
2049 iph = (struct ecore_iphdr *)((u8 *)(ethh) + eth_hlen); in ecore_iwarp_parse_rx_pkt()
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()
2060 cm_info->remote_ip[0] = ntohl(iph->saddr); in ecore_iwarp_parse_rx_pkt()
2063 ip_hlen = (iph->ihl)*sizeof(u32); in ecore_iwarp_parse_rx_pkt()
2064 *payload_len = ntohs(iph->tot_len) - ip_hlen; 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()
[all …]

12