Home
last modified time | relevance | path

Searched refs:ethhdr (Results 1 – 25 of 278) sorted by relevance

12345678910>>...12

/linux/drivers/net/wireless/intel/iwlwifi/mei/
H A Dnet.c33 static bool iwl_mei_rx_filter_eth(const struct ethhdr *ethhdr, in iwl_mei_rx_filter_eth() argument
41 if (!is_multicast_ether_addr(ethhdr->h_dest) || in iwl_mei_rx_filter_eth()
42 is_broadcast_ether_addr(ethhdr->h_dest)) in iwl_mei_rx_filter_eth()
52 if (compare_ether_header(filt->mac_address, ethhdr->h_dest)) in iwl_mei_rx_filter_eth()
282 const struct ethhdr *ethhdr = (void *)skb_mac_header(skb); in iwl_mei_rx_pass_to_csme() local
301 if (skb_headroom(skb) < sizeof(*ethhdr)) in iwl_mei_rx_pass_to_csme()
304 if (iwl_mei_rx_filter_eth(ethhdr, filters, in iwl_mei_rx_pass_to_csme()
375 struct ethhdr ethhdr; in iwl_mei_tx_copy_to_csme() local
376 struct ethhdr *eth; in iwl_mei_tx_copy_to_csme()
397 memcpy(ethhdr.h_dest, ieee80211_get_DA(hdr), ETH_ALEN); in iwl_mei_tx_copy_to_csme()
[all …]
/linux/include/linux/
H A Dif_ether.h25 static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) in eth_hdr()
27 return (struct ethhdr *)skb_mac_header(skb); in eth_hdr()
33 static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) in skb_eth_hdr()
35 return (struct ethhdr *)skb->data; in skb_eth_hdr()
38 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) in inner_eth_hdr()
40 return (struct ethhdr *)skb_inner_mac_header(skb); in inner_eth_hdr()
/linux/net/batman-adv/
H A Drouting.c186 struct ethhdr *ethhdr; in batadv_check_management_packet() local
192 ethhdr = eth_hdr(skb); in batadv_check_management_packet()
195 if (!is_broadcast_ether_addr(ethhdr->h_dest)) in batadv_check_management_packet()
199 if (!is_valid_ether_addr(ethhdr->h_source)) in batadv_check_management_packet()
415 struct ethhdr *ethhdr; in batadv_recv_icmp_packet() local
423 ethhdr = eth_hdr(skb); in batadv_recv_icmp_packet()
426 if (!is_valid_ether_addr(ethhdr->h_dest)) in batadv_recv_icmp_packet()
430 if (is_multicast_ether_addr(ethhdr->h_source)) in batadv_recv_icmp_packet()
434 if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest)) in batadv_recv_icmp_packet()
450 ethhdr = eth_hdr(skb); in batadv_recv_icmp_packet()
[all …]
H A Dbridge_loop_avoidance.c347 struct ethhdr *ethhdr; in batadv_bla_send_claim() local
379 ethhdr = (struct ethhdr *)skb->data; in batadv_bla_send_claim()
380 hw_src = (u8 *)ethhdr + ETH_HLEN + sizeof(struct arphdr); in batadv_bla_send_claim()
388 ether_addr_copy(ethhdr->h_source, mac); in batadv_bla_send_claim()
409 ethhdr->h_source, batadv_print_vid(vid)); in batadv_bla_send_claim()
417 ether_addr_copy(ethhdr->h_dest, mac); in batadv_bla_send_claim()
420 ethhdr->h_source, ethhdr->h_dest, in batadv_bla_send_claim()
424 ether_addr_copy(ethhdr->h_source, mac); in batadv_bla_send_claim()
427 __func__, ethhdr->h_source, ethhdr->h_dest, in batadv_bla_send_claim()
907 u8 *backbone_addr, struct ethhdr *ethhdr, in batadv_handle_request() argument
[all …]
H A Dmesh-interface.c229 struct ethhdr *ethhdr; in batadv_interface_tx() local
253 ethhdr = eth_hdr(skb); in batadv_interface_tx()
255 proto = ethhdr->h_proto; in batadv_interface_tx()
281 ethhdr = eth_hdr(skb); in batadv_interface_tx()
284 if (!is_multicast_ether_addr(ethhdr->h_source) && in batadv_interface_tx()
285 !batadv_bla_is_loopdetect_mac(ethhdr->h_source)) { in batadv_interface_tx()
286 client_added = batadv_tt_local_add(mesh_iface, ethhdr->h_source, in batadv_interface_tx()
302 if (batadv_compare_eth(ethhdr->h_dest, stp_addr)) in batadv_interface_tx()
305 if (batadv_compare_eth(ethhdr->h_dest, ectp_addr)) in batadv_interface_tx()
309 if (is_multicast_ether_addr(ethhdr->h_dest)) { in batadv_interface_tx()
[all …]
H A Dmain.c396 struct ethhdr ethhdr_tmp; in batadv_skb_set_priority()
400 struct ethhdr *ethhdr; in batadv_skb_set_priority() local
408 ethhdr = skb_header_pointer(skb, offset, sizeof(*ethhdr), &ethhdr_tmp); in batadv_skb_set_priority()
409 if (!ethhdr) in batadv_skb_set_priority()
412 switch (ethhdr->h_proto) { in batadv_skb_set_priority()
422 ip_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority()
429 ip6_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority()
650 struct ethhdr *ethhdr = (struct ethhdr *)(skb->data + header_len); in batadv_get_vid() local
654 if (ethhdr->h_proto != htons(ETH_P_8021Q)) in batadv_get_vid()
H A Dsend.c65 struct ethhdr *ethhdr; in batadv_send_skb_packet() local
86 ethhdr = eth_hdr(skb); in batadv_send_skb_packet()
87 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet()
88 ether_addr_copy(ethhdr->h_dest, dst_addr); in batadv_send_skb_packet()
89 ethhdr->h_proto = htons(ETH_P_BATMAN); in batadv_send_skb_packet()
326 struct ethhdr *ethhdr; in batadv_send_skb_unicast() local
353 ethhdr = eth_hdr(skb); in batadv_send_skb_unicast()
361 if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid)) in batadv_send_skb_unicast()
399 struct ethhdr *ethhdr = (struct ethhdr *)skb->data; in batadv_send_skb_via_tt_generic() local
405 src = ethhdr->h_source; in batadv_send_skb_via_tt_generic()
[all …]
H A Dbat_v_ogm.c701 const struct ethhdr *ethhdr, in batadv_v_ogm_route_update() argument
720 orig_neigh_node = batadv_v_ogm_orig_get(bat_priv, ethhdr->h_source); in batadv_v_ogm_route_update()
797 const struct ethhdr *ethhdr, in batadv_v_ogm_process_per_outif() argument
824 forward = batadv_v_ogm_route_update(bat_priv, ethhdr, ogm2, orig_node, in batadv_v_ogm_process_per_outif()
884 struct ethhdr *ethhdr; in batadv_v_ogm_process() local
890 ethhdr = eth_hdr(skb); in batadv_v_ogm_process()
897 ethhdr->h_source, if_incoming->net_dev->name, in batadv_v_ogm_process()
918 hardif_neigh = batadv_hardif_neigh_get(if_incoming, ethhdr->h_source); in batadv_v_ogm_process()
930 ethhdr->h_source); in batadv_v_ogm_process()
945 batadv_v_ogm_process_per_outif(bat_priv, ethhdr, ogm_packet, orig_node, in batadv_v_ogm_process()
[all …]
H A Dbat_iv_ogm.c798 const struct ethhdr *ethhdr, in batadv_iv_ogm_forward() argument
829 ether_addr_copy(batadv_ogm_packet->prev_sender, ethhdr->h_source); in batadv_iv_ogm_forward()
1103 const struct ethhdr *ethhdr, in batadv_iv_ogm_orig_update() argument
1127 if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && in batadv_iv_ogm_orig_update()
1158 ethhdr->h_source, in batadv_iv_ogm_orig_update()
1388 batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, in batadv_iv_ogm_update_seqnos() argument
1442 if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && in batadv_iv_ogm_update_seqnos()
1534 struct ethhdr *ethhdr; in batadv_iv_ogm_process_per_outif() local
1547 ethhdr = eth_hdr(skb_priv); in batadv_iv_ogm_process_per_outif()
1550 dup_status = batadv_iv_ogm_update_seqnos(ethhdr, ogm_packet, in batadv_iv_ogm_process_per_outif()
[all …]
H A Dgateway_client.c576 struct ethhdr *ethhdr; in batadv_gw_dhcp_recipient_get() local
587 ethhdr = eth_hdr(skb); in batadv_gw_dhcp_recipient_get()
588 proto = ethhdr->h_proto; in batadv_gw_dhcp_recipient_get()
706 struct ethhdr *ethhdr; in batadv_gw_out_of_range() local
711 ethhdr = (struct ethhdr *)skb->data; in batadv_gw_out_of_range()
713 if (is_multicast_ether_addr(ethhdr->h_dest)) in batadv_gw_out_of_range()
716 orig_dst_node = batadv_transtable_search(bat_priv, ethhdr->h_source, in batadv_gw_out_of_range()
717 ethhdr->h_dest, vid); in batadv_gw_out_of_range()
/linux/drivers/net/usb/
H A Dlg-vl600.c100 struct ethhdr *ethhdr; in vl600_rx_fixup() local
175 ethhdr = (struct ethhdr *)buf->data; in vl600_rx_fixup()
176 if (be16_to_cpup(&ethhdr->h_proto) == ETH_P_ARP && in vl600_rx_fixup()
179 memcpy(ethhdr->h_source, in vl600_rx_fixup()
180 &buf->data[sizeof(*ethhdr) + 0x8], in vl600_rx_fixup()
182 memcpy(ethhdr->h_dest, in vl600_rx_fixup()
183 &buf->data[sizeof(*ethhdr) + 0x12], in vl600_rx_fixup()
186 eth_zero_addr(ethhdr->h_source); in vl600_rx_fixup()
187 memcpy(ethhdr->h_dest, dev->net->dev_addr, ETH_ALEN); in vl600_rx_fixup()
194 if ((buf->data[sizeof(*ethhdr)] & 0xf0) == 0x60) in vl600_rx_fixup()
[all …]
/linux/net/hsr/
H A Dhsr_main.h76 struct ethhdr ethhdr; member
114 struct ethhdr ethhdr; member
119 struct ethhdr ethhdr; member
264 struct ethhdr *ethhdr; in prp_check_lsdu_size() local
270 ethhdr = (struct ethhdr *)skb_mac_header(skb); in prp_check_lsdu_size()
272 if (ethhdr->h_proto == htons(ETH_P_8021Q)) in prp_check_lsdu_size()
H A Dhsr_framereg.c260 struct ethhdr *ethhdr; in hsr_get_node() local
267 ethhdr = (struct ethhdr *)skb_mac_header(skb); in hsr_get_node()
270 if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) { in hsr_get_node()
275 if (ether_addr_equal(node->macaddress_B, ethhdr->h_source)) { in hsr_get_node()
284 if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) { in hsr_get_node()
294 if (ethhdr->h_proto == htons(ETH_P_PRP) || in hsr_get_node()
295 ethhdr->h_proto == htons(ETH_P_HSR)) { in hsr_get_node()
304 ethhdr->h_proto == htons(ETH_P_PRP) && is_sup; in hsr_get_node()
314 return hsr_add_node(hsr, node_db, ethhdr->h_source, san, rx_port); in hsr_get_node()
390 struct ethhdr *ethhdr; in hsr_handle_sup_frame() local
[all …]
H A Dhsr_forward.c37 struct ethhdr *eth_hdr; in is_supervision_frame()
44 eth_hdr = (struct ethhdr *)skb_mac_header(skb); in is_supervision_frame()
124 struct ethhdr *eth_hdr; in is_proxy_supervision_frame()
127 eth_hdr = (struct ethhdr *)skb_mac_header(skb); in is_proxy_supervision_frame()
320 hsr_ethhdr->hsr_tag.encap_proto = hsr_ethhdr->ethhdr.h_proto; in hsr_fill_tag()
321 hsr_ethhdr->ethhdr.h_proto = htons(proto_version ? in hsr_fill_tag()
323 skb->protocol = hsr_ethhdr->ethhdr.h_proto; in hsr_fill_tag()
704 struct ethhdr *ethhdr; in fill_frame_info() local
709 if (skb->mac_len < sizeof(struct ethhdr)) in fill_frame_info()
727 ethhdr = (struct ethhdr *)skb_mac_header(skb); in fill_frame_info()
[all …]
/linux/net/ethernet/
H A Deth.c83 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header()
128 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen()
158 const struct ethhdr *eth; in eth_type_trans()
199 const struct ethhdr *eth = eth_hdr(skb); in eth_header_parse()
216 struct ethhdr *eth; in eth_header_cache()
219 eth = (struct ethhdr *) in eth_header_cache()
250 memcpy(((u8 *) hh->hh_data) + HH_DATA_OFF(sizeof(struct ethhdr)), in eth_header_cache_update()
261 const struct ethhdr *eth = eth_hdr(skb); in eth_header_parse_protocol()
395 struct ethhdr *eh, *eh2; in eth_gro_receive()
412 eh2 = (struct ethhdr *)(p->data + off_eth); in eth_gro_receive()
[all …]
/linux/samples/bpf/
H A Dxdp_tx_iptunnel_kern.c67 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr()
68 const struct ethhdr *old_eth, in set_ethhdr()
82 struct ethhdr *new_eth; in handle_ipv4()
83 struct ethhdr *old_eth; in handle_ipv4()
84 struct iphdr *iph = data + sizeof(struct ethhdr); in handle_ipv4()
157 struct ethhdr *new_eth; in handle_ipv6()
158 struct ethhdr *old_eth; in handle_ipv6()
159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6()
220 struct ethhdr *eth = data; in _xdp_tx_iptunnel()
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_xdp.c69 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr()
70 const struct ethhdr *old_eth, in set_ethhdr()
84 struct ethhdr *new_eth; in handle_ipv4()
85 struct ethhdr *old_eth; in handle_ipv4()
86 struct iphdr *iph = data + sizeof(struct ethhdr); in handle_ipv4()
157 struct ethhdr *new_eth; in handle_ipv6()
158 struct ethhdr *old_eth; in handle_ipv6()
159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6()
217 struct ethhdr *eth = data; in _xdp_tx_iptunnel()
H A Dtest_xdp_loop.c65 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr()
66 const struct ethhdr *old_eth, in set_ethhdr()
80 struct ethhdr *new_eth; in handle_ipv4()
81 struct ethhdr *old_eth; in handle_ipv4()
82 struct iphdr *iph = data + sizeof(struct ethhdr); in handle_ipv4()
153 struct ethhdr *new_eth; in handle_ipv6()
154 struct ethhdr *old_eth; in handle_ipv6()
155 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6()
213 struct ethhdr *eth = data; in _xdp_tx_iptunnel()
H A Dtest_xdp_dynptr.c23 #define ethhdr_sz sizeof(struct ethhdr)
67 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr()
68 const struct ethhdr *old_eth, in set_ethhdr()
84 struct ethhdr *new_eth; in handle_ipv4()
85 struct ethhdr *old_eth; in handle_ipv4()
130 old_eth = (struct ethhdr *)(iph + 1); in handle_ipv4()
166 struct ethhdr *new_eth; in handle_ipv6()
167 struct ethhdr *old_eth; in handle_ipv6()
209 old_eth = (struct ethhdr *)(ip6h + 1); in handle_ipv6()
235 struct ethhdr *eth; in _xdp_tx_iptunnel()
H A Dtest_tc_neigh_fib.c31 if (data + sizeof(struct ethhdr) > data_end) in fill_fib_params_v4()
34 ip4h = (struct iphdr *)(data + sizeof(struct ethhdr)); in fill_fib_params_v4()
59 if (data + sizeof(struct ethhdr) > data_end) in fill_fib_params_v6()
62 ip6h = (struct ipv6hdr *)(data + sizeof(struct ethhdr)); in fill_fib_params_v6()
85 if (data + sizeof(struct ethhdr) > data_end) in tc_chk()
129 struct ethhdr *eth = ctx_ptr(skb->data); in tc_redir()
H A Dtest_tc_neigh.c46 if (data + sizeof(struct ethhdr) > data_end) in is_remote_ep_v4()
49 ip4h = (struct iphdr *)(data + sizeof(struct ethhdr)); in is_remote_ep_v4()
63 if (data + sizeof(struct ethhdr) > data_end) in is_remote_ep_v6()
66 ip6h = (struct ipv6hdr *)(data + sizeof(struct ethhdr)); in is_remote_ep_v6()
80 if (data + sizeof(struct ethhdr) > data_end) in tc_chk()
H A Dtest_tc_change_tail.c16 struct ethhdr *eth = data; in parse_ip_header()
24 iph = (void *)(data + sizeof(struct ethhdr)); in parse_ip_header()
27 if ((void *)(data + sizeof(struct ethhdr) + sizeof(*iph)) > data_end) in parse_ip_header()
/linux/tools/testing/selftests/net/
H A Dnat6to4.bpf.c51 const int l2_header_size = sizeof(struct ethhdr); in sched_cls_ingress6_nat_6_prog()
54 const struct ethhdr * const eth = data; // used iff is_ethernet in sched_cls_ingress6_nat_6_prog()
89 struct ethhdr eth2; // used iff is_ethernet in sched_cls_ingress6_nat_6_prog()
139 struct ethhdr *new_eth = data; in sched_cls_ingress6_nat_6_prog()
152 const int l2_header_size = sizeof(struct ethhdr); in sched_cls_egress4_snat4_prog()
155 const struct ethhdr *const eth = data; // used iff is_ethernet in sched_cls_egress4_snat4_prog()
224 struct ethhdr eth2; // used iff is_ethernet in sched_cls_egress4_snat4_prog()
276 struct ethhdr *new_eth = data; in sched_cls_egress4_snat4_prog()
/linux/drivers/net/wireless/nxp/nxpwifi/
H A Dsta_rx.c26 struct ethhdr *eth; in nxpwifi_discard_gratuitous_arp()
30 eth = (struct ethhdr *)skb->data; in nxpwifi_discard_gratuitous_arp()
33 arp = (void *)(skb->data + sizeof(struct ethhdr)); in nxpwifi_discard_gratuitous_arp()
41 ipv6 = (void *)(skb->data + sizeof(struct ethhdr)); in nxpwifi_discard_gratuitous_arp()
42 icmpv6 = (void *)(skb->data + sizeof(struct ethhdr) + in nxpwifi_discard_gratuitous_arp()
70 struct ethhdr *eth; in nxpwifi_process_rx_packet()
102 eth = (struct ethhdr *) in nxpwifi_process_rx_packet()
/linux/drivers/net/wireless/marvell/mwifiex/
H A Dsta_rx.c27 struct ethhdr *eth; in mwifiex_discard_gratuitous_arp()
31 eth = (struct ethhdr *)skb->data; in mwifiex_discard_gratuitous_arp()
34 arp = (void *)(skb->data + sizeof(struct ethhdr)); in mwifiex_discard_gratuitous_arp()
42 ipv6 = (void *)(skb->data + sizeof(struct ethhdr)); in mwifiex_discard_gratuitous_arp()
43 icmpv6 = (void *)(skb->data + sizeof(struct ethhdr) + in mwifiex_discard_gratuitous_arp()
78 struct ethhdr *eth; in mwifiex_process_rx_packet()
115 eth = (struct ethhdr *) in mwifiex_process_rx_packet()

12345678910>>...12