Home
last modified time | relevance | path

Searched refs:ih (Results 1 – 12 of 12) sorted by relevance

/net/netfilter/ipvs/
Dip_vs_proto.c221 struct iphdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v4() local
223 ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); in ip_vs_tcpudp_debug_packet_v4()
224 if (ih == NULL) in ip_vs_tcpudp_debug_packet_v4()
226 else if (ih->frag_off & htons(IP_OFFSET)) in ip_vs_tcpudp_debug_packet_v4()
227 sprintf(buf, "%pI4->%pI4 frag", &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4()
231 pptr = skb_header_pointer(skb, offset + ih->ihl*4, in ip_vs_tcpudp_debug_packet_v4()
235 &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4()
238 &ih->saddr, ntohs(pptr[0]), in ip_vs_tcpudp_debug_packet_v4()
239 &ih->daddr, ntohs(pptr[1])); in ip_vs_tcpudp_debug_packet_v4()
253 struct ipv6hdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v6() local
[all …]
/net/bridge/netfilter/
Debt_log.c99 const struct iphdr *ih; in ebt_log_packet() local
102 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet()
103 if (ih == NULL) { in ebt_log_packet()
108 &ih->saddr, &ih->daddr, ih->tos, ih->protocol); in ebt_log_packet()
109 print_ports(skb, ih->protocol, ih->ihl*4); in ebt_log_packet()
116 const struct ipv6hdr *ih; in ebt_log_packet() local
122 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet()
123 if (ih == NULL) { in ebt_log_packet()
128 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr); in ebt_log_packet()
129 nexthdr = ih->nexthdr; in ebt_log_packet()
Debt_ip.c41 const struct iphdr *ih; in ebt_ip_mt() local
46 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_ip_mt()
47 if (ih == NULL) in ebt_ip_mt()
50 NF_INVF(info, EBT_IP_TOS, info->tos != ih->tos)) in ebt_ip_mt()
54 (ih->saddr & info->smsk) != info->saddr)) in ebt_ip_mt()
58 (ih->daddr & info->dmsk) != info->daddr)) in ebt_ip_mt()
61 if (NF_INVF(info, EBT_IP_PROTO, info->protocol != ih->protocol)) in ebt_ip_mt()
66 if (ntohs(ih->frag_off) & IP_OFFSET) in ebt_ip_mt()
70 pptr = skb_header_pointer(skb, ih->ihl*4, in ebt_ip_mt()
Debt_among.c74 const struct iphdr *ih; in get_ip_dst() local
77 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_dst()
78 if (ih == NULL) in get_ip_dst()
80 *addr = ih->daddr; in get_ip_dst()
105 const struct iphdr *ih; in get_ip_src() local
108 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_src()
109 if (ih == NULL) in get_ip_src()
111 *addr = ih->saddr; in get_ip_src()
/net/netfilter/
Dnf_log_syslog.c297 const struct iphdr *ih; in dump_ipv4_packet() local
306 ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph); in dump_ipv4_packet()
307 if (!ih) { in dump_ipv4_packet()
316 nf_log_buf_add(m, "SRC=%pI4 DST=%pI4 ", &ih->saddr, &ih->daddr); in dump_ipv4_packet()
320 ntohs(ih->tot_len), ih->tos & IPTOS_TOS_MASK, in dump_ipv4_packet()
321 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet()
324 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet()
326 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet()
328 if (ntohs(ih->frag_off) & IP_MF) in dump_ipv4_packet()
332 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet()
[all …]
Dxt_AUDIT.c34 const struct iphdr *ih; in audit_ip4() local
36 ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_iph), &_iph); in audit_ip4()
37 if (!ih) in audit_ip4()
41 &ih->saddr, &ih->daddr, ih->protocol); in audit_ip4()
49 const struct ipv6hdr *ih; in audit_ip6() local
53 ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_ip6h), &_ip6h); in audit_ip6()
54 if (!ih) in audit_ip6()
57 nexthdr = ih->nexthdr; in audit_ip6()
61 &ih->saddr, &ih->daddr, nexthdr); in audit_ip6()
Dnft_log.c32 const struct iphdr *ih; in audit_ip4() local
34 ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_iph), &_iph); in audit_ip4()
35 if (!ih) in audit_ip4()
39 &ih->saddr, &ih->daddr, ih->protocol); in audit_ip4()
47 const struct ipv6hdr *ih; in audit_ip6() local
51 ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_ip6h), &_ip6h); in audit_ip6()
52 if (!ih) in audit_ip6()
55 nexthdr = ih->nexthdr; in audit_ip6()
59 &ih->saddr, &ih->daddr, nexthdr); in audit_ip6()
Dnf_conntrack_proto_sctp.c284 struct sctp_inithdr _inithdr, *ih; in sctp_new() local
289 ih = skb_header_pointer(skb, offset + sizeof(_sch), in sctp_new()
291 if (!ih) in sctp_new()
295 ih->init_tag); in sctp_new()
297 ct->proto.sctp.vtag[IP_CT_DIR_REPLY] = ih->init_tag; in sctp_new()
479 struct sctp_inithdr _inithdr, *ih; in nf_conntrack_sctp_packet() local
481 ih = skb_header_pointer(skb, offset + sizeof(_sch), in nf_conntrack_sctp_packet()
483 if (ih == NULL) in nf_conntrack_sctp_packet()
486 ih->init_tag, !dir); in nf_conntrack_sctp_packet()
487 ct->proto.sctp.vtag[!dir] = ih->init_tag; in nf_conntrack_sctp_packet()
/net/ipv6/ila/
Dila_common.c109 struct icmp6hdr *ih = (struct icmp6hdr *) in ila_csum_adjust_transport() local
113 inet_proto_csum_replace_by_diff(&ih->icmp6_cksum, skb, in ila_csum_adjust_transport()
/net/bridge/
Dbr_multicast.c815 struct igmphdr *ih; in br_ip4_multicast_alloc_query() local
821 igmp_hdr_size = sizeof(*ih); in br_ip4_multicast_alloc_query()
886 ih = igmp_hdr(skb); in br_ip4_multicast_alloc_query()
887 ih->type = IGMP_HOST_MEMBERSHIP_QUERY; in br_ip4_multicast_alloc_query()
888 ih->code = (group ? brmctx->multicast_last_member_interval : in br_ip4_multicast_alloc_query()
891 ih->group = group; in br_ip4_multicast_alloc_query()
892 ih->csum = 0; in br_ip4_multicast_alloc_query()
893 csum = &ih->csum; in br_ip4_multicast_alloc_query()
894 csum_start = (void *)ih; in br_ip4_multicast_alloc_query()
2618 struct igmpv3_report *ih; in br_ip4_multicast_igmp3_report() local
[all …]
/net/ipv4/
Digmp.c731 struct igmphdr *ih; in igmp_send_report() local
789 ih = skb_put(skb, sizeof(struct igmphdr)); in igmp_send_report()
790 ih->type = type; in igmp_send_report()
791 ih->code = 0; in igmp_send_report()
792 ih->csum = 0; in igmp_send_report()
793 ih->group = group; in igmp_send_report()
794 ih->csum = ip_compute_csum((void *)ih, sizeof(struct igmphdr)); in igmp_send_report()
947 struct igmphdr *ih = igmp_hdr(skb); in igmp_heard_query() local
950 __be32 group = ih->group; in igmp_heard_query()
957 if (ih->code == 0) { in igmp_heard_query()
[all …]
/net/core/
Dflow_dissector.c166 struct icmphdr *ih, _ih; in skb_flow_get_icmp_tci() local
168 ih = __skb_header_pointer(skb, thoff, sizeof(_ih), data, hlen, &_ih); in skb_flow_get_icmp_tci()
169 if (!ih) in skb_flow_get_icmp_tci()
172 key_icmp->type = ih->type; in skb_flow_get_icmp_tci()
173 key_icmp->code = ih->code; in skb_flow_get_icmp_tci()
178 if (icmp_has_id(ih->type)) in skb_flow_get_icmp_tci()
179 key_icmp->id = ih->un.echo.id ? ntohs(ih->un.echo.id) : 1; in skb_flow_get_icmp_tci()