Home
last modified time | relevance | path

Searched refs:h_proto (Results 1 – 25 of 167) sorted by relevance

1234567

/Linux-v4.19/samples/bpf/
Dxdp1_kern.c50 u16 h_proto; in xdp_prog1() local
58 h_proto = eth->h_proto; in xdp_prog1()
60 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
67 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
69 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
76 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
79 if (h_proto == htons(ETH_P_IP)) in xdp_prog1()
81 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
Dxdp2_kern.c66 u16 h_proto; in xdp_prog1() local
74 h_proto = eth->h_proto; in xdp_prog1()
76 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
83 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
85 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1()
92 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_prog1()
95 if (h_proto == htons(ETH_P_IP)) in xdp_prog1()
97 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
Dparse_varlen.c118 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()
Dtc_l2_redirect_kern.c37 unsigned short h_proto; member
76 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_forward()
89 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_iptun_ingress_forward()
127 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_redirect()
135 if (!is_vip_addr(eth->h_proto, daddr)) in _l2_to_iptun_ingress_redirect()
166 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_ip6tun_ingress_redirect()
173 if (!is_vip_addr(eth->h_proto, iph->daddr)) in _l2_to_ip6tun_ingress_redirect()
178 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_ip6tun_ingress_redirect()
185 if (!is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0])) in _l2_to_ip6tun_ingress_redirect()
216 if (eth->h_proto == htons(ETH_P_IP)) { in _drop_non_tun_vip()
[all …]
Dxdp_fwd_kern.c51 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()
113 if (h_proto == htons(ETH_P_IP)) in xdp_fwd_flags()
115 else if (h_proto == htons(ETH_P_IPV6)) in xdp_fwd_flags()
Dxdp_router_ipv4_kern.c119 u16 h_proto; in xdp_router_ipv4_prog() local
127 h_proto = eth->h_proto; in xdp_router_ipv4_prog()
129 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_router_ipv4_prog()
136 h_proto = vhdr->h_vlan_encapsulated_proto; in xdp_router_ipv4_prog()
138 if (h_proto == htons(ETH_P_ARP)) { in xdp_router_ipv4_prog()
140 } else if (h_proto == htons(ETH_P_IP)) { in xdp_router_ipv4_prog()
Dxdp_adjust_tail_kern.c52 eth->h_proto = orig_eth->h_proto; in swap_mac()
139 __u16 h_proto; in _xdp_icmp() local
144 h_proto = eth->h_proto; in _xdp_icmp()
146 if (h_proto == htons(ETH_P_IP)) in _xdp_icmp()
Dxdp_tx_iptunnel_kern.c70 __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()
Dtest_cgrp2_tc_kern.c19 unsigned short h_proto; member
56 if (eth->h_proto != htons(ETH_P_IPV6) || in handle_egress()
59 eth->h_proto, ip6h->nexthdr); in handle_egress()
Dparse_simple.c23 unsigned short h_proto; member
39 if (eth->h_proto != htons(ETH_P_IP)) in handle_ingress()
Dparse_ldabs.c31 if (load_half(skb, offsetof(struct ethhdr, h_proto)) != ETH_P_IP) in handle_ingress()
/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_xdp.c73 __be16 h_proto) in set_ethhdr() argument
77 new_eth->h_proto = h_proto; in set_ethhdr()
219 __u16 h_proto; in _xdp_tx_iptunnel() local
224 h_proto = eth->h_proto; in _xdp_tx_iptunnel()
226 if (h_proto == bpf_htons(ETH_P_IP)) in _xdp_tx_iptunnel()
228 else if (h_proto == bpf_htons(ETH_P_IPV6)) in _xdp_tx_iptunnel()
Dtest_pkt_access.c36 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in process()
44 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in process()
/Linux-v4.19/net/hsr/
Dhsr_forward.c66 if (!(ethHdr->h_proto == htons(ETH_P_PRP) in is_supervision_frame()
67 || ethHdr->h_proto == htons(ETH_P_HSR))) in is_supervision_frame()
71 if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */ in is_supervision_frame()
118 skb->protocol = eth_hdr(skb)->h_proto; in create_stripped_skb()
152 hsr_ethhdr->hsr_tag.encap_proto = hsr_ethhdr->ethhdr.h_proto; in hsr_fill_tag()
153 hsr_ethhdr->ethhdr.h_proto = htons(protoVersion ? in hsr_fill_tag()
333 if (ethhdr->h_proto == htons(ETH_P_8021Q)) { in hsr_fill_frame_info()
338 if (ethhdr->h_proto == htons(ETH_P_PRP) in hsr_fill_frame_info()
339 || ethhdr->h_proto == htons(ETH_P_HSR)) { in hsr_fill_frame_info()
/Linux-v4.19/net/ethernet/
Deth.c89 eth->h_proto = htons(type); in eth_header()
91 eth->h_proto = htons(len); in eth_header()
138 if (!skb_flow_dissect_flow_keys_basic(NULL, &keys, data, eth->h_proto, in eth_get_headlen()
187 if (likely(eth_proto_is_802_3(eth->h_proto))) in eth_type_trans()
188 return eth->h_proto; in eth_type_trans()
239 eth->h_proto = type; in eth_header_cache()
462 type = eh->h_proto; in eth_gro_receive()
487 __be16 type = eh->h_proto; in eth_gro_complete()
/Linux-v4.19/net/bridge/netfilter/
Debt_log.c89 ntohs(eth_hdr(skb)->h_proto)); in ebt_log_packet()
96 if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto == in ebt_log_packet()
113 if ((bitmask & EBT_LOG_IP6) && eth_hdr(skb)->h_proto == in ebt_log_packet()
138 ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || in ebt_log_packet()
139 (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { in ebt_log_packet()
Debt_among.c72 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_dst()
80 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_dst()
103 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_src()
111 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_src()
/Linux-v4.19/drivers/net/wireless/intel/ipw2x00/
Dlibipw_tx.c129 static int libipw_copy_snap(u8 * data, __be16 h_proto) in libipw_copy_snap() argument
139 if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX)) in libipw_copy_snap()
147 memcpy(data + SNAP_SIZE, &h_proto, sizeof(u16)); in libipw_copy_snap()
229 if (eth->h_proto != htons(ETH_P_IP)) in libipw_classify()
295 ether_type = ((struct ethhdr *)skb->data)->h_proto; in libipw_xmit()
/Linux-v4.19/drivers/staging/gdm724x/
Dgdm_lte.c117 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_arp()
163 skb_out->protocol = ((struct ethhdr *)mac_header_data)->h_proto; in gdm_lte_emulate_arp()
238 if (ntohs(((struct ethhdr *)skb_in->data)->h_proto) == ETH_P_8021Q) { in gdm_lte_emulate_ndp()
246 if (ntohs(eth.h_proto) != ETH_P_IPV6) in gdm_lte_emulate_ndp()
325 skb_out->protocol = ((struct ethhdr *)mac_header_data)->h_proto; in gdm_lte_emulate_ndp()
351 if (ntohs(eth->h_proto) == ETH_P_8021Q) { in gdm_lte_tx_nic_type()
357 mac_proto = ntohs(eth->h_proto); in gdm_lte_tx_nic_type()
640 eth.h_proto = htons(ETH_P_ARP); in gdm_lte_netif_rx()
645 eth.h_proto = htons(ETH_P_IP); in gdm_lte_netif_rx()
648 eth.h_proto = htons(ETH_P_IPV6); in gdm_lte_netif_rx()
[all …]
/Linux-v4.19/drivers/net/wireless/ath/ath10k/
Dwow.c132 &old_hdr_pattern->h_proto, in ath10k_wow_convert_8023_to_80211()
133 sizeof(old_hdr_pattern->h_proto)); in ath10k_wow_convert_8023_to_80211()
135 &old_hdr_mask->h_proto, in ath10k_wow_convert_8023_to_80211()
136 sizeof(old_hdr_mask->h_proto)); in ath10k_wow_convert_8023_to_80211()
142 else if (old->pkt_offset < offsetof(struct ethhdr, h_proto)) in ath10k_wow_convert_8023_to_80211()
152 else if (total_len > offsetof(struct ethhdr, h_proto)) in ath10k_wow_convert_8023_to_80211()
/Linux-v4.19/drivers/net/usb/
Dlg-vl600.c61 __be16 h_proto; member
190 if (be16_to_cpup(&ethhdr->h_proto) == ETH_P_ARP && in vl600_rx_fixup()
209 ethhdr->h_proto = htons(ETH_P_IPV6); in vl600_rx_fixup()
299 packet->h_proto = htons(ETH_P_IP); in vl600_tx_fixup()
/Linux-v4.19/drivers/staging/rtl8192u/ieee80211/
Dieee80211_tx.c156 static inline int ieee80211_put_snap(u8 *data, u16 h_proto) in ieee80211_put_snap() argument
166 if (h_proto == 0x8137 || h_proto == 0x80f3) in ieee80211_put_snap()
174 *(__be16 *)(data + SNAP_SIZE) = htons(h_proto); in ieee80211_put_snap()
281 if (eth->h_proto != htons(ETH_P_IP)) in ieee80211_classify()
640 ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto); in ieee80211_xmit()
/Linux-v4.19/include/net/
Dfirewire.h23 __be16 h_proto; /* packet type ID field */ member
/Linux-v4.19/net/bluetooth/bnep/
Dcore.c349 s->eh.h_proto = get_unaligned((__be16 *) (skb->data - 2)); in bnep_rx_frame()
358 if (ntohs(s->eh.h_proto) == ETH_P_8021Q) { in bnep_rx_frame()
361 s->eh.h_proto = get_unaligned((__be16 *) (skb->data - 2)); in bnep_rx_frame()
383 put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2)); in bnep_rx_frame()
393 put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2)); in bnep_rx_frame()
/Linux-v4.19/drivers/staging/rtl8192e/
Drtllib_tx.c150 static int rtllib_put_snap(u8 *data, u16 h_proto) in rtllib_put_snap() argument
160 if (h_proto == 0x8137 || h_proto == 0x80f3) in rtllib_put_snap()
168 *(__be16 *)(data + SNAP_SIZE) = htons(h_proto); in rtllib_put_snap()
256 if (eth->h_proto != htons(ETH_P_IP)) in rtllib_classify()
615 ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto); in rtllib_xmit_inter()

1234567