| /linux/samples/bpf/ |
| H A D | parse_varlen.c | 118 uint64_t h_proto, nh_off; in handle_ingress() local 124 h_proto = eth->h_proto; in handle_ingress() 126 if (h_proto == ETH_P_8021Q || h_proto == ETH_P_8021AD) { in handle_ingress() 133 h_proto = vhdr->h_vlan_encapsulated_proto; in handle_ingress() 135 if (h_proto == ETH_P_8021Q || h_proto == ETH_P_8021AD) { in handle_ingress() 142 h_proto = vhdr->h_vlan_encapsulated_proto; in handle_ingress() 144 if (h_proto == htons(ETH_P_IP)) in handle_ingress() 146 else if (h_proto == htons(ETH_P_IPV6)) in handle_ingress()
|
| H A D | xdp_fwd_kern.c | 51 u16 h_proto; in xdp_fwd_flags() local 61 h_proto = eth->h_proto; in xdp_fwd_flags() 62 if (h_proto == htons(ETH_P_IP)) { in xdp_fwd_flags() 79 } else if (h_proto == htons(ETH_P_IPV6)) { in xdp_fwd_flags() 133 if (h_proto == htons(ETH_P_IP)) in xdp_fwd_flags() 135 else if (h_proto == htons(ETH_P_IPV6)) in xdp_fwd_flags()
|
| H A D | xdp_router_ipv4.bpf.c | 81 __be16 h_proto; in xdp_router_ipv4_prog() local 91 h_proto = eth->h_proto; in xdp_router_ipv4_prog() 92 if (h_proto == bpf_htons(ETH_P_8021Q) || in xdp_router_ipv4_prog() 93 h_proto == bpf_htons(ETH_P_8021AD)) { in xdp_router_ipv4_prog() 101 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_router_ipv4_prog() 104 switch (bpf_ntohs(h_proto)) { in xdp_router_ipv4_prog()
|
| H A D | xdp_tx_iptunnel_kern.c | 70 __be16 h_proto) in set_ethhdr() argument 74 new_eth->h_proto = h_proto; in set_ethhdr() 221 __u16 h_proto; in _xdp_tx_iptunnel() local 226 h_proto = eth->h_proto; in _xdp_tx_iptunnel() 228 if (h_proto == htons(ETH_P_IP)) in _xdp_tx_iptunnel() 230 else if (h_proto == htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
|
| H A D | parse_simple.c | 23 unsigned short h_proto; member 39 if (eth->h_proto != htons(ETH_P_IP)) in handle_ingress()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | xdp_redirect_multi_kern.c | 53 __u16 h_proto; in xdp_redirect_map_multi_prog() 61 h_proto = bpf_htons(eth->h_proto); in xdp_redirect_map_multi_prog() 63 flags_from_map = bpf_map_lookup_elem(&redirect_flags, &h_proto); in xdp_redirect_map_multi_prog() 66 if (h_proto == ETH_P_IP) { 71 if (h_proto == ETH_P_IPV6) { in xdp_redirect_map_all_prog() 44 __u16 h_proto; xdp_redirect_map_multi_prog() local
|
| H A D | test_xdp.c | 72 __be16 h_proto) in set_ethhdr() argument 76 new_eth->h_proto = h_proto; in set_ethhdr() 218 __u16 h_proto; in _xdp_tx_iptunnel() local 223 h_proto = eth->h_proto; in _xdp_tx_iptunnel() 225 if (h_proto == bpf_htons(ETH_P_IP)) in _xdp_tx_iptunnel() 227 else if (h_proto == bpf_htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
|
| H A D | test_xdp_loop.c | 68 __be16 h_proto) in set_ethhdr() argument 72 new_eth->h_proto = h_proto; in set_ethhdr() 214 __u16 h_proto; in _xdp_tx_iptunnel() local 219 h_proto = eth->h_proto; in _xdp_tx_iptunnel() 221 if (h_proto == bpf_htons(ETH_P_IP)) in _xdp_tx_iptunnel() 223 else if (h_proto == bpf_htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
|
| H A D | xdp_hw_metadata.c | 42 if (eth + 1 < data_end && (eth->h_proto == bpf_htons(ETH_P_8021AD) || in rx() 43 eth->h_proto == bpf_htons(ETH_P_8021Q))) in rx() 46 if (eth + 1 < data_end && eth->h_proto == bpf_htons(ETH_P_8021Q)) in rx() 50 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in rx() 55 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in rx()
|
| H A D | test_xdp_dynptr.c | 70 __be16 h_proto) in set_ethhdr() argument 74 new_eth->h_proto = h_proto; in set_ethhdr() 236 __u16 h_proto; in _xdp_tx_iptunnel() local 245 h_proto = eth->h_proto; in _xdp_tx_iptunnel() 247 if (h_proto == bpf_htons(ETH_P_IP)) in _xdp_tx_iptunnel() 249 else if (h_proto == bpf_htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
|
| H A D | dynptr_fail.c | 1107 hdr->h_proto = 1; in skb_invalid_data_slice1() 1147 val = hdr->h_proto; in skb_invalid_data_slice3() 1153 val = hdr->h_proto; in skb_invalid_data_slice3() 1173 hdr->h_proto = 123; in skb_invalid_data_slice4() 1179 hdr->h_proto = 1; in skb_invalid_data_slice4() 1200 val = hdr->h_proto; in xdp_invalid_data_slice1() 1205 val = hdr->h_proto; in xdp_invalid_data_slice1() 1225 hdr->h_proto = 123; in xdp_invalid_data_slice2() 1230 hdr->h_proto = 1; in xdp_invalid_data_slice2() 1431 val = hdr->h_proto; in dynptr_is_null_invalid() [all...] |
| H A D | xdp_metadata.c | 53 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in rx() 58 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in rx()
|
| H A D | test_pkt_access.c | 115 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in test_pkt_access() 123 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in test_pkt_access()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 102 .eth.h_proto = __bpf_constant_htons(ETH_P_IP), 124 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), 145 .eth.h_proto = __bpf_constant_htons(ETH_P_8021Q), 168 .eth.h_proto = __bpf_constant_htons(ETH_P_8021AD), 192 .eth.h_proto = __bpf_constant_htons(ETH_P_IP), 219 .eth.h_proto = __bpf_constant_htons(ETH_P_IP), 242 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), 269 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), 292 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), 315 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), [all …]
|
| H A D | kfree_skb.c | 40 if (CHECK(pkt_v6->eth.h_proto != htons(ETH_P_IPV6), "check_eth", in on_sample() 41 "h_proto %x\n", pkt_v6->eth.h_proto)) in on_sample()
|
| /linux/net/ethernet/ |
| H A D | eth.c | 86 eth->h_proto = htons(type); in eth_header() 88 eth->h_proto = htons(len); in eth_header() 137 eth->h_proto, sizeof(*eth), in eth_get_headlen() 176 if (likely(eth_proto_is_802_3(eth->h_proto))) in eth_type_trans() 177 return eth->h_proto; in eth_type_trans() 225 eth->h_proto = type; in eth_header_cache() 263 return eth->h_proto; in eth_header_parse_protocol() 419 type = eh->h_proto; in eth_gro_receive() 444 __be16 type = eh->h_proto; in eth_gro_complete()
|
| /linux/net/bridge/netfilter/ |
| H A D | ebt_log.c | 90 ntohs(eth_hdr(skb)->h_proto)); in ebt_log_packet() 97 if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto == in ebt_log_packet() 114 if ((bitmask & EBT_LOG_IP6) && eth_hdr(skb)->h_proto == in ebt_log_packet() 139 ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || in ebt_log_packet() 140 (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { in ebt_log_packet()
|
| H A D | ebt_among.c | 73 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_dst() 81 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_dst() 104 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_src() 112 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_src()
|
| /linux/tools/testing/selftests/net/ |
| H A D | nat6to4.bpf.c | 70 if (eth->h_proto != bpf_htons(ETH_P_IPV6)) in sched_cls_ingress6_nat_6_prog() 92 eth2.h_proto = bpf_htons(ETH_P_IP); // But replace the ethertype in sched_cls_ingress6_nat_6_prog() 167 if (eth->h_proto != bpf_htons(ETH_P_IP)) in sched_cls_egress4_snat4_prog() 227 eth2.h_proto = bpf_htons(ETH_P_IPV6); // But replace the ethertype in sched_cls_egress4_snat4_prog()
|
| /linux/drivers/net/wireless/intel/ipw2x00/ |
| H A D | libipw_tx.c | 115 static int libipw_copy_snap(u8 * data, __be16 h_proto) in libipw_copy_snap() argument 125 if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX)) in libipw_copy_snap() 133 memcpy(data + SNAP_SIZE, &h_proto, sizeof(u16)); in libipw_copy_snap() 214 if (eth->h_proto != htons(ETH_P_IP)) in libipw_classify() 280 ether_type = ((struct ethhdr *)skb->data)->h_proto; in libipw_xmit()
|
| /linux/drivers/net/usb/ |
| H A D | lg-vl600.c | 49 __be16 h_proto; member 176 if (be16_to_cpup(ðhdr->h_proto) == ETH_P_ARP && in vl600_rx_fixup() 195 ethhdr->h_proto = htons(ETH_P_IPV6); in vl600_rx_fixup() 285 packet->h_proto = htons(ETH_P_IP); in vl600_tx_fixup()
|
| /linux/drivers/net/ethernet/engleder/ |
| H A D | tsnep_rxnfc.c | 115 fsp->h_u.ether_spec.h_proto = htons(rule->filter.ether_type); in tsnep_rxnfc_get_rule() 116 fsp->m_u.ether_spec.h_proto = ETHER_TYPE_FULL_MASK; in tsnep_rxnfc_get_rule() 180 rule->filter.ether_type = ntohs(fsp->h_u.ether_spec.h_proto); in tsnep_rxnfc_init_rule() 214 fsp->m_u.ether_spec.h_proto != ETHER_TYPE_FULL_MASK) { in tsnep_rxnfc_add_rule()
|
| /linux/tools/testing/selftests/net/lib/ |
| H A D | xdp_native.bpf.c | 88 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in filter_udphdr() 106 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in filter_udphdr() 192 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in xdp_mode_tx_handler() 229 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in update_pkt() 282 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in xdp_adjst_tail_shrnk_data() 296 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in xdp_adjst_tail_shrnk_data()
|
| /linux/drivers/net/wireless/ath/ath10k/ |
| H A D | wow.c | 121 &old_hdr_pattern->h_proto, in ath10k_wow_convert_8023_to_80211() 122 sizeof(old_hdr_pattern->h_proto)); in ath10k_wow_convert_8023_to_80211() 124 &old_hdr_mask->h_proto, in ath10k_wow_convert_8023_to_80211() 125 sizeof(old_hdr_mask->h_proto)); in ath10k_wow_convert_8023_to_80211() 131 else if (old->pkt_offset < offsetof(struct ethhdr, h_proto)) in ath10k_wow_convert_8023_to_80211() 141 else if (total_len > offsetof(struct ethhdr, h_proto)) in ath10k_wow_convert_8023_to_80211()
|
| /linux/net/bluetooth/bnep/ |
| H A D | core.c | 356 s->eh.h_proto = get_unaligned((__be16 *) (skb->data - 2)); in bnep_rx_frame() 365 if (ntohs(s->eh.h_proto) == ETH_P_8021Q) { in bnep_rx_frame() 368 s->eh.h_proto = get_unaligned((__be16 *) (skb->data - 2)); in bnep_rx_frame() 390 put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2)); in bnep_rx_frame() 396 put_unaligned(s->eh.h_proto, (__be16 *)__skb_put(nskb, 2)); in bnep_rx_frame() 401 put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2)); in bnep_rx_frame()
|