| /linux/drivers/net/wireless/intel/iwlwifi/mei/ |
| A D | net.c | 33 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() 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() 405 eth = skb_push(skb, sizeof(ethhdr.h_dest) + sizeof(ethhdr.h_source)); in iwl_mei_tx_copy_to_csme() [all …]
|
| /linux/include/linux/ |
| A D | if_ether.h | 22 static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) in eth_hdr() 24 return (struct ethhdr *)skb_mac_header(skb); in eth_hdr() 30 static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) in skb_eth_hdr() 32 return (struct ethhdr *)skb->data; in skb_eth_hdr() 35 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) in inner_eth_hdr() 37 return (struct ethhdr *)skb_inner_mac_header(skb); in inner_eth_hdr()
|
| /linux/net/batman-adv/ |
| A D | routing.c | 181 struct ethhdr *ethhdr; in batadv_check_management_packet() local 187 ethhdr = eth_hdr(skb); in batadv_check_management_packet() 344 struct ethhdr *ethhdr; in batadv_recv_icmp_packet() local 353 ethhdr = eth_hdr(skb); in batadv_recv_icmp_packet() 387 ethhdr->h_dest); in batadv_recv_icmp_packet() 444 struct ethhdr *ethhdr; in batadv_check_unicast_packet() local 450 ethhdr = eth_hdr(skb); in batadv_check_unicast_packet() 662 struct ethhdr *ethhdr = eth_hdr(skb); in batadv_route_unicast_packet() local 793 struct ethhdr *ethhdr; in batadv_check_unicast_ttvn() local 807 ethhdr = (struct ethhdr *)(skb->data + hdr_len); in batadv_check_unicast_ttvn() [all …]
|
| A D | bridge_loop_avoidance.c | 344 struct ethhdr *ethhdr; in batadv_bla_send_claim() local 380 ethhdr = (struct ethhdr *)skb->data; in batadv_bla_send_claim() 421 ethhdr->h_source, ethhdr->h_dest, in batadv_bla_send_claim() 428 __func__, ethhdr->h_source, ethhdr->h_dest, in batadv_bla_send_claim() 897 u8 *backbone_addr, struct ethhdr *ethhdr, in batadv_handle_request() argument 1013 struct ethhdr *ethhdr) in batadv_check_claim_group() argument 1084 struct ethhdr *ethhdr; in batadv_bla_process_claim() local 1165 ethhdr); in batadv_bla_process_claim() 1842 struct ethhdr *ethhdr; in batadv_bla_loopdetect_check() local 1898 struct ethhdr *ethhdr; in batadv_bla_rx() local [all …]
|
| A D | network-coding.c | 1045 struct ethhdr *ethhdr, in batadv_nc_code_packets() argument 1370 struct ethhdr *ethhdr; in batadv_nc_skb_store_before_coding() local 1379 ether_addr_copy(ethhdr->h_source, ethhdr->h_dest); in batadv_nc_skb_store_before_coding() 1409 struct ethhdr *ethhdr) in batadv_nc_skb_dst_search() argument 1502 struct ethhdr *ethhdr = eth_hdr(skb); in batadv_nc_skb_forward() local 1555 struct ethhdr *ethhdr = eth_hdr(skb); in batadv_nc_skb_store_for_decoding() local 1614 struct ethhdr *ethhdr = eth_hdr(skb); in batadv_nc_skb_store_sniffed_unicast() local 1643 struct ethhdr *ethhdr, ethhdr_tmp; in batadv_nc_skb_decode_packet() local 1666 *ethhdr = ethhdr_tmp; in batadv_nc_skb_decode_packet() 1730 struct ethhdr *ethhdr, in batadv_nc_find_decoding_packet() argument [all …]
|
| A D | soft-interface.c | 183 struct ethhdr *ethhdr; in batadv_interface_tx() local 216 ethhdr = eth_hdr(skb); in batadv_interface_tx() 218 proto = ethhdr->h_proto; in batadv_interface_tx() 244 ethhdr = eth_hdr(skb); in batadv_interface_tx() 272 if (is_multicast_ether_addr(ethhdr->h_dest)) { in batadv_interface_tx() 284 ethhdr = eth_hdr(skb); in batadv_interface_tx() 422 struct ethhdr *ethhdr; in batadv_interface_rx() local 441 ethhdr = eth_hdr(skb); in batadv_interface_rx() 443 switch (ntohs(ethhdr->h_proto)) { in batadv_interface_rx() 475 ethhdr->h_source, vid); in batadv_interface_rx() [all …]
|
| A D | send.c | 68 struct ethhdr *ethhdr; in batadv_send_skb_packet() local 91 ethhdr = eth_hdr(skb); in batadv_send_skb_packet() 92 ether_addr_copy(ethhdr->h_source, hard_iface->net_dev->dev_addr); in batadv_send_skb_packet() 93 ether_addr_copy(ethhdr->h_dest, dst_addr); in batadv_send_skb_packet() 94 ethhdr->h_proto = htons(ETH_P_BATMAN); in batadv_send_skb_packet() 338 struct ethhdr *ethhdr; in batadv_send_skb_unicast() local 365 ethhdr = eth_hdr(skb); in batadv_send_skb_unicast() 373 if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid)) in batadv_send_skb_unicast() 408 struct ethhdr *ethhdr = (struct ethhdr *)skb->data; in batadv_send_skb_via_tt_generic() local 413 src = ethhdr->h_source; in batadv_send_skb_via_tt_generic() [all …]
|
| A D | main.c | 364 struct ethhdr ethhdr_tmp, *ethhdr; in batadv_skb_set_priority() local 372 ethhdr = skb_header_pointer(skb, offset, sizeof(*ethhdr), ðhdr_tmp); in batadv_skb_set_priority() 373 if (!ethhdr) in batadv_skb_set_priority() 376 switch (ethhdr->h_proto) { in batadv_skb_set_priority() 386 ip_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority() 393 ip6_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority() 628 struct ethhdr *ethhdr = (struct ethhdr *)(skb->data + header_len); in batadv_get_vid() local 632 if (ethhdr->h_proto != htons(ETH_P_8021Q)) in batadv_get_vid()
|
| A D | bat_v_ogm.c | 689 const struct ethhdr *ethhdr, in batadv_v_ogm_route_update() argument 706 orig_neigh_node = batadv_v_ogm_orig_get(bat_priv, ethhdr->h_source); in batadv_v_ogm_route_update() 783 const struct ethhdr *ethhdr, in batadv_v_ogm_process_per_outif() argument 856 struct ethhdr *ethhdr; in batadv_v_ogm_process() local 865 ethhdr = eth_hdr(skb); in batadv_v_ogm_process() 872 ethhdr->h_source, if_incoming->net_dev->name, in batadv_v_ogm_process() 905 ethhdr->h_source); in batadv_v_ogm_process() 964 batadv_v_ogm_process_per_outif(bat_priv, ethhdr, ogm_packet, in batadv_v_ogm_process() 990 struct ethhdr *ethhdr; in batadv_v_ogm_packet_recv() local 1004 ethhdr = eth_hdr(skb); in batadv_v_ogm_packet_recv() [all …]
|
| A D | bat_iv_ogm.c | 682 const struct ethhdr *ethhdr, in batadv_iv_ogm_forward() argument 917 const struct ethhdr *ethhdr, in batadv_iv_ogm_orig_update() argument 1205 batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, in batadv_iv_ogm_update_seqnos() argument 1326 struct ethhdr *ethhdr; in batadv_iv_ogm_process_per_outif() local 1348 ethhdr->h_source); in batadv_iv_ogm_process_per_outif() 1384 ethhdr->h_source); in batadv_iv_ogm_process_per_outif() 1558 struct ethhdr *ethhdr; in batadv_iv_ogm_process() local 1564 ethhdr = eth_hdr(skb); in batadv_iv_ogm_process() 1622 ethhdr->h_source); in batadv_iv_ogm_process() 1644 ethhdr->h_source); in batadv_iv_ogm_process() [all …]
|
| /linux/drivers/net/usb/ |
| A D | lg-vl600.c | 100 struct ethhdr *ethhdr; in vl600_rx_fixup() local 175 ethhdr = (struct ethhdr *) skb->data; 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() 194 if ((buf->data[sizeof(*ethhdr)] & 0xf0) == 0x60) in vl600_rx_fixup() 195 ethhdr->h_proto = htons(ETH_P_IPV6); in vl600_rx_fixup() 237 int orig_len = skb->len - sizeof(struct ethhdr); in vl600_tx_fixup() [all …]
|
| /linux/net/hsr/ |
| A D | hsr_main.h | 76 struct ethhdr ethhdr; member 114 struct ethhdr ethhdr; member 119 struct ethhdr ethhdr; member 266 struct ethhdr *ethhdr; in prp_check_lsdu_size() local 272 ethhdr = (struct ethhdr *)skb_mac_header(skb); in prp_check_lsdu_size() 274 if (ethhdr->h_proto == htons(ETH_P_8021Q)) in prp_check_lsdu_size()
|
| A D | hsr_framereg.c | 219 struct ethhdr *ethhdr; in hsr_get_node() local 227 ethhdr = (struct ethhdr *)skb_mac_header(skb); in hsr_get_node() 230 if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) { in hsr_get_node() 254 if (ethhdr->h_proto == htons(ETH_P_PRP) || in hsr_get_node() 255 ethhdr->h_proto == htons(ETH_P_HSR)) { in hsr_get_node() 275 return hsr_add_node(hsr, node_db, ethhdr->h_source, seq_out, in hsr_get_node() 293 struct ethhdr *ethhdr; in hsr_handle_sup_frame() local 312 pull_size = sizeof(struct ethhdr); in hsr_handle_sup_frame() 316 ethhdr = (struct ethhdr *)skb_mac_header(skb); in hsr_handle_sup_frame() 319 if (ethhdr->h_proto == htons(ETH_P_HSR)) { in hsr_handle_sup_frame() [all …]
|
| A D | hsr_forward.c | 37 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() 299 hsr_ethhdr->ethhdr.h_proto = htons(proto_version ? in hsr_fill_tag() 301 skb->protocol = hsr_ethhdr->ethhdr.h_proto; in hsr_fill_tag() 660 struct ethhdr *ethhdr; in fill_frame_info() local 665 if (skb->mac_len < sizeof(struct ethhdr)) in fill_frame_info() 683 ethhdr = (struct ethhdr *)skb_mac_header(skb); in fill_frame_info() 685 proto = ethhdr->h_proto; in fill_frame_info() [all …]
|
| /linux/net/ethernet/ |
| A D | eth.c | 83 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header() 128 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen() 159 const struct ethhdr *eth; in eth_type_trans() 203 const struct ethhdr *eth = eth_hdr(skb); in eth_header_parse() 219 struct ethhdr *eth; in eth_header_cache() 222 eth = (struct ethhdr *) in eth_header_cache() 253 memcpy(((u8 *) hh->hh_data) + HH_DATA_OFF(sizeof(struct ethhdr)), in eth_header_cache_update() 264 const struct ethhdr *eth = eth_hdr(skb); in eth_header_parse_protocol() 398 struct ethhdr *eh, *eh2; in eth_gro_receive() 415 eh2 = (struct ethhdr *)(p->data + off_eth); in eth_gro_receive() [all …]
|
| /linux/samples/bpf/ |
| A D | xdp_adjust_tail_kern.c | 48 static __always_inline void swap_mac(void *data, struct ethhdr *orig_eth) in swap_mac() 50 struct ethhdr *eth; in swap_mac() 84 struct ethhdr *orig_eth; in send_icmp4_too_big() 90 off += sizeof(struct ethhdr); in send_icmp4_too_big() 98 icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr)); in send_icmp4_too_big() 110 ICMP_TOOBIG_SIZE + headroom - sizeof(struct ethhdr)); in send_icmp4_too_big() 141 struct ethhdr *eth = data; in _xdp_icmp()
|
| A D | xdp_tx_iptunnel_kern.c | 67 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/ |
| A D | test_xdp.c | 69 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()
|
| A D | test_xdp_loop.c | 65 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()
|
| A D | test_xdp_dynptr.c | 23 #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()
|
| A D | test_tc_neigh_fib.c | 31 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()
|
| A D | test_tc_neigh.c | 46 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()
|
| A D | test_tcp_check_syncookie_kern.c | 50 struct ethhdr *ethh; in check_syncookie() 66 ipv4h = data + sizeof(struct ethhdr); in check_syncookie() 73 tcph = data + sizeof(struct ethhdr) + sizeof(struct iphdr); in check_syncookie() 98 ipv6h = data + sizeof(struct ethhdr); in check_syncookie() 105 tcph = data + sizeof(struct ethhdr) + sizeof(struct ipv6hdr); in check_syncookie()
|
| /linux/tools/testing/selftests/net/ |
| A D | nat6to4.bpf.c | 51 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/marvell/mwifiex/ |
| A D | sta_rx.c | 27 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()
|