/net/netfilter/ |
D | xt_LOG.c | 170 const struct iphdr *ih; in dump_ipv4_packet() local 178 ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph); in dump_ipv4_packet() 179 if (ih == NULL) { in dump_ipv4_packet() 188 &ih->saddr, &ih->daddr); in dump_ipv4_packet() 192 ntohs(ih->tot_len), ih->tos & IPTOS_TOS_MASK, in dump_ipv4_packet() 193 ih->tos & IPTOS_PREC_MASK, ih->ttl, ntohs(ih->id)); in dump_ipv4_packet() 196 if (ntohs(ih->frag_off) & IP_CE) in dump_ipv4_packet() 198 if (ntohs(ih->frag_off) & IP_DF) in dump_ipv4_packet() 200 if (ntohs(ih->frag_off) & IP_MF) in dump_ipv4_packet() 204 if (ntohs(ih->frag_off) & IP_OFFSET) in dump_ipv4_packet() [all …]
|
D | xt_AUDIT.c | 77 const struct iphdr *ih; in audit_ip4() local 79 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in audit_ip4() 80 if (!ih) { in audit_ip4() 86 &ih->saddr, &ih->daddr, ntohs(ih->id), ih->protocol); in audit_ip4() 88 if (ntohs(ih->frag_off) & IP_OFFSET) { in audit_ip4() 93 audit_proto(ab, skb, ih->protocol, ih->ihl * 4); in audit_ip4() 99 const struct ipv6hdr *ih; in audit_ip6() local 104 ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_ip6h), &_ip6h); in audit_ip6() 105 if (!ih) { in audit_ip6() 110 nexthdr = ih->nexthdr; in audit_ip6() [all …]
|
D | nf_conntrack_proto_sctp.c | 376 sctp_inithdr_t _inithdr, *ih; in sctp_packet() local 378 ih = skb_header_pointer(skb, offset + sizeof(sctp_chunkhdr_t), in sctp_packet() 380 if (ih == NULL) in sctp_packet() 383 ih->init_tag, !dir); in sctp_packet() 384 ct->proto.sctp.vtag[!dir] = ih->init_tag; in sctp_packet() 453 sctp_inithdr_t _inithdr, *ih; in sctp_new() local 455 ih = skb_header_pointer(skb, offset + sizeof(sctp_chunkhdr_t), in sctp_new() 457 if (ih == NULL) in sctp_new() 461 ih->init_tag); in sctp_new() 464 ih->init_tag; in sctp_new()
|
/net/netfilter/ipvs/ |
D | ip_vs_proto.c | 245 struct iphdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v4() local 247 ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); in ip_vs_tcpudp_debug_packet_v4() 248 if (ih == NULL) in ip_vs_tcpudp_debug_packet_v4() 250 else if (ih->frag_off & htons(IP_OFFSET)) in ip_vs_tcpudp_debug_packet_v4() 251 sprintf(buf, "%pI4->%pI4 frag", &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4() 255 pptr = skb_header_pointer(skb, offset + ih->ihl*4, in ip_vs_tcpudp_debug_packet_v4() 259 &ih->saddr, &ih->daddr); in ip_vs_tcpudp_debug_packet_v4() 262 &ih->saddr, ntohs(pptr[0]), in ip_vs_tcpudp_debug_packet_v4() 263 &ih->daddr, ntohs(pptr[1])); in ip_vs_tcpudp_debug_packet_v4() 277 struct ipv6hdr _iph, *ih; in ip_vs_tcpudp_debug_packet_v6() local [all …]
|
/net/bridge/netfilter/ |
D | ebt_log.c | 100 const struct iphdr *ih; in ebt_log_packet() local 103 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet() 104 if (ih == NULL) { in ebt_log_packet() 109 &ih->saddr, &ih->daddr, ih->tos, ih->protocol); in ebt_log_packet() 110 print_ports(skb, ih->protocol, ih->ihl*4); in ebt_log_packet() 117 const struct ipv6hdr *ih; in ebt_log_packet() local 123 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_log_packet() 124 if (ih == NULL) { in ebt_log_packet() 129 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr); in ebt_log_packet() 130 nexthdr = ih->nexthdr; in ebt_log_packet()
|
D | ebt_ip.c | 31 const struct iphdr *ih; in ebt_ip_mt() local 36 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in ebt_ip_mt() 37 if (ih == NULL) in ebt_ip_mt() 40 FWINV(info->tos != ih->tos, EBT_IP_TOS)) in ebt_ip_mt() 43 FWINV((ih->saddr & info->smsk) != in ebt_ip_mt() 47 FWINV((ih->daddr & info->dmsk) != in ebt_ip_mt() 51 if (FWINV(info->protocol != ih->protocol, EBT_IP_PROTO)) in ebt_ip_mt() 56 if (ntohs(ih->frag_off) & IP_OFFSET) in ebt_ip_mt() 58 pptr = skb_header_pointer(skb, ih->ihl*4, in ebt_ip_mt()
|
D | ebt_among.c | 73 const struct iphdr *ih; in get_ip_dst() local 76 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_dst() 77 if (ih == NULL) in get_ip_dst() 79 *addr = ih->daddr; in get_ip_dst() 104 const struct iphdr *ih; in get_ip_src() local 107 ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); in get_ip_src() 108 if (ih == NULL) in get_ip_src() 110 *addr = ih->saddr; in get_ip_src()
|
/net/bridge/ |
D | br_multicast.c | 349 struct igmphdr *ih; in br_ip4_multicast_alloc_query() local 354 sizeof(*ih) + 4); in br_ip4_multicast_alloc_query() 379 iph->tot_len = htons(sizeof(*iph) + sizeof(*ih) + 4); in br_ip4_multicast_alloc_query() 394 ih = igmp_hdr(skb); in br_ip4_multicast_alloc_query() 395 ih->type = IGMP_HOST_MEMBERSHIP_QUERY; in br_ip4_multicast_alloc_query() 396 ih->code = (group ? br->multicast_last_member_interval : in br_ip4_multicast_alloc_query() 399 ih->group = group; in br_ip4_multicast_alloc_query() 400 ih->csum = 0; in br_ip4_multicast_alloc_query() 401 ih->csum = ip_compute_csum((void *)ih, sizeof(struct igmphdr)); in br_ip4_multicast_alloc_query() 402 skb_put(skb, sizeof(*ih)); in br_ip4_multicast_alloc_query() [all …]
|
/net/ipv4/ |
D | igmp.c | 644 struct igmphdr *ih; in igmp_send_report() local 696 ih = (struct igmphdr *)skb_put(skb, sizeof(struct igmphdr)); in igmp_send_report() 697 ih->type = type; in igmp_send_report() 698 ih->code = 0; in igmp_send_report() 699 ih->csum = 0; in igmp_send_report() 700 ih->group = group; in igmp_send_report() 701 ih->csum = ip_compute_csum((void *)ih, sizeof(struct igmphdr)); in igmp_send_report() 843 struct igmphdr *ih = igmp_hdr(skb); in igmp_heard_query() local 846 __be32 group = ih->group; in igmp_heard_query() 852 if (ih->code == 0) { in igmp_heard_query() [all …]
|