Home
last modified time | relevance | path

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

/net/ipv4/netfilter/
Dnf_log_ipv4.c40 const struct iphdr *ih; in dump_ipv4_packet() local
48 ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph); in dump_ipv4_packet()
49 if (ih == NULL) { in dump_ipv4_packet()
57 nf_log_buf_add(m, "SRC=%pI4 DST=%pI4 ", &ih->saddr, &ih->daddr); in dump_ipv4_packet()
61 ntohs(ih->tot_len), ih->tos & IPTOS_TOS_MASK, in dump_ipv4_packet()
62 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet()
65 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet()
67 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet()
69 if (ntohs(ih->frag_off) & IP_MF) in dump_ipv4_packet()
73 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet()
[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/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/netfilter/
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.c293 struct sctp_inithdr _inithdr, *ih; in sctp_new() local
298 ih = skb_header_pointer(skb, offset + sizeof(_sch), in sctp_new()
300 if (!ih) in sctp_new()
304 ih->init_tag); in sctp_new()
306 ct->proto.sctp.vtag[IP_CT_DIR_REPLY] = ih->init_tag; in sctp_new()
456 struct sctp_inithdr _inithdr, *ih; in nf_conntrack_sctp_packet() local
458 ih = skb_header_pointer(skb, offset + sizeof(_sch), in nf_conntrack_sctp_packet()
460 if (ih == NULL) in nf_conntrack_sctp_packet()
463 ih->init_tag, !dir); in nf_conntrack_sctp_packet()
464 ct->proto.sctp.vtag[!dir] = ih->init_tag; in nf_conntrack_sctp_packet()
/net/ipv6/netfilter/
Dnf_log_ipv6.c44 const struct ipv6hdr *ih; in dump_ipv6_packet() local
54 ih = skb_header_pointer(skb, ip6hoff, sizeof(_ip6h), &_ip6h); in dump_ipv6_packet()
55 if (ih == NULL) { in dump_ipv6_packet()
61 nf_log_buf_add(m, "SRC=%pI6 DST=%pI6 ", &ih->saddr, &ih->daddr); in dump_ipv6_packet()
65 ntohs(ih->payload_len) + sizeof(struct ipv6hdr), in dump_ipv6_packet()
66 (ntohl(*(__be32 *)ih) & 0x0ff00000) >> 20, in dump_ipv6_packet()
67 ih->hop_limit, in dump_ipv6_packet()
68 (ntohl(*(__be32 *)ih) & 0x000fffff)); in dump_ipv6_packet()
72 currenthdr = ih->nexthdr; in dump_ipv6_packet()
/net/bridge/
Dbr_multicast.c223 struct igmphdr *ih; in br_ip4_multicast_alloc_query() local
227 igmp_hdr_size = sizeof(*ih); in br_ip4_multicast_alloc_query()
276 ih = igmp_hdr(skb); in br_ip4_multicast_alloc_query()
277 ih->type = IGMP_HOST_MEMBERSHIP_QUERY; in br_ip4_multicast_alloc_query()
278 ih->code = (group ? br->multicast_last_member_interval : in br_ip4_multicast_alloc_query()
281 ih->group = group; in br_ip4_multicast_alloc_query()
282 ih->csum = 0; in br_ip4_multicast_alloc_query()
283 ih->csum = ip_compute_csum((void *)ih, sizeof(*ih)); in br_ip4_multicast_alloc_query()
922 struct igmpv3_report *ih; in br_ip4_multicast_igmp3_report() local
932 ih = igmpv3_report_hdr(skb); in br_ip4_multicast_igmp3_report()
[all …]
/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/ipv4/
Digmp.c729 struct igmphdr *ih; in igmp_send_report() local
786 ih = skb_put(skb, sizeof(struct igmphdr)); in igmp_send_report()
787 ih->type = type; in igmp_send_report()
788 ih->code = 0; in igmp_send_report()
789 ih->csum = 0; in igmp_send_report()
790 ih->group = group; in igmp_send_report()
791 ih->csum = ip_compute_csum((void *)ih, sizeof(struct igmphdr)); in igmp_send_report()
936 struct igmphdr *ih = igmp_hdr(skb); in igmp_heard_query() local
939 __be32 group = ih->group; in igmp_heard_query()
946 if (ih->code == 0) { in igmp_heard_query()
[all …]