| /linux/drivers/net/wireless/intel/iwlwifi/mei/ |
| H 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() 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/net/batman-adv/ |
| H A D | routing.c | 180 struct ethhdr *ethhdr; in batadv_check_management_packet() local 186 ethhdr = eth_hdr(skb); in batadv_check_management_packet() 189 if (!is_broadcast_ether_addr(ethhdr->h_dest)) in batadv_check_management_packet() 193 if (!is_valid_ether_addr(ethhdr->h_source)) in batadv_check_management_packet() 343 struct ethhdr *ethhdr; in batadv_recv_icmp_packet() local 352 ethhdr = eth_hdr(skb); in batadv_recv_icmp_packet() 355 if (!is_valid_ether_addr(ethhdr->h_dest)) in batadv_recv_icmp_packet() 359 if (is_multicast_ether_addr(ethhdr->h_source)) in batadv_recv_icmp_packet() 363 if (!batadv_is_my_mac(bat_priv, ethhdr->h_dest)) in batadv_recv_icmp_packet() 379 ethhdr = eth_hdr(skb); in batadv_recv_icmp_packet() [all …]
|
| H 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() 381 hw_src = (u8 *)ethhdr + ETH_HLEN + sizeof(struct arphdr); in batadv_bla_send_claim() 389 ether_addr_copy(ethhdr->h_source, mac); in batadv_bla_send_claim() 410 ethhdr->h_source, batadv_print_vid(vid)); in batadv_bla_send_claim() 418 ether_addr_copy(ethhdr->h_dest, mac); in batadv_bla_send_claim() 421 ethhdr->h_source, ethhdr->h_dest, in batadv_bla_send_claim() 425 ether_addr_copy(ethhdr->h_source, mac); 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 [all …]
|
| H A D | mesh-interface.c | 170 struct ethhdr *ethhdr; in batadv_interface_tx() local 203 ethhdr = eth_hdr(skb); in batadv_interface_tx() 205 proto = ethhdr->h_proto; in batadv_interface_tx() 231 ethhdr = eth_hdr(skb); in batadv_interface_tx() 234 if (!is_multicast_ether_addr(ethhdr->h_source) && in batadv_interface_tx() 235 !batadv_bla_is_loopdetect_mac(ethhdr->h_source)) { in batadv_interface_tx() 236 client_added = batadv_tt_local_add(mesh_iface, ethhdr->h_source, in batadv_interface_tx() 252 if (batadv_compare_eth(ethhdr->h_dest, stp_addr)) in batadv_interface_tx() 255 if (batadv_compare_eth(ethhdr->h_dest, ectp_addr)) in batadv_interface_tx() 259 if (is_multicast_ether_addr(ethhdr->h_dest)) { in batadv_interface_tx() [all …]
|
| H A D | main.c | 342 struct ethhdr ethhdr_tmp, *ethhdr; in batadv_skb_set_priority() local 350 ethhdr = skb_header_pointer(skb, offset, sizeof(*ethhdr), ðhdr_tmp); in batadv_skb_set_priority() 351 if (!ethhdr) in batadv_skb_set_priority() 354 switch (ethhdr->h_proto) { in batadv_skb_set_priority() 364 ip_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority() 371 ip6_hdr = skb_header_pointer(skb, offset + sizeof(*ethhdr), in batadv_skb_set_priority() 573 struct ethhdr *ethhdr = (struct ethhdr *)(skb->data + header_len); in batadv_get_vid() local 577 if (ethhdr->h_proto != htons(ETH_P_8021Q)) in batadv_get_vid()
|
| H A D | send.c | 65 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() 325 struct ethhdr *ethhdr; in batadv_send_skb_unicast() local 352 ethhdr = eth_hdr(skb); in batadv_send_skb_unicast() 360 if (batadv_tt_global_client_is_roaming(bat_priv, ethhdr->h_dest, vid)) in batadv_send_skb_unicast() 395 struct ethhdr *ethhdr = (struct ethhdr *)skb->data; in batadv_send_skb_via_tt_generic() local 400 src = ethhdr->h_source; in batadv_send_skb_via_tt_generic() [all …]
|
| H A D | bat_v_ogm.c | 685 const struct ethhdr *ethhdr, in batadv_v_ogm_route_update() argument 702 orig_neigh_node = batadv_v_ogm_orig_get(bat_priv, ethhdr->h_source); in batadv_v_ogm_route_update() 779 const struct ethhdr *ethhdr, in batadv_v_ogm_process_per_outif() argument 806 forward = batadv_v_ogm_route_update(bat_priv, ethhdr, ogm2, orig_node, in batadv_v_ogm_process_per_outif() 851 struct ethhdr *ethhdr; in batadv_v_ogm_process() local 861 ethhdr = eth_hdr(skb); in batadv_v_ogm_process() 868 ethhdr->h_source, if_incoming->net_dev->name, in batadv_v_ogm_process() 889 hardif_neigh = batadv_hardif_neigh_get(if_incoming, ethhdr->h_source); in batadv_v_ogm_process() 901 ethhdr->h_source); in batadv_v_ogm_process() 916 batadv_v_ogm_process_per_outif(bat_priv, ethhdr, ogm_packet, orig_node, in batadv_v_ogm_process() [all …]
|
| H A D | bat_iv_ogm.c | 692 const struct ethhdr *ethhdr, in batadv_iv_ogm_forward() argument 723 ether_addr_copy(batadv_ogm_packet->prev_sender, ethhdr->h_source); in batadv_iv_ogm_forward() 925 const struct ethhdr *ethhdr, in batadv_iv_ogm_orig_update() argument 948 if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && in batadv_iv_ogm_orig_update() 980 orig_tmp = batadv_iv_ogm_orig_get(bat_priv, ethhdr->h_source); in batadv_iv_ogm_orig_update() 985 ethhdr->h_source, in batadv_iv_ogm_orig_update() 1213 batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, in batadv_iv_ogm_update_seqnos() argument 1267 if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && in batadv_iv_ogm_update_seqnos() 1334 struct ethhdr *ethhdr; in batadv_iv_ogm_process_per_outif() local 1345 ethhdr = eth_hdr(skb_priv); in batadv_iv_ogm_process_per_outif() [all …]
|
| /linux/drivers/net/usb/ |
| H A D | lg-vl600.c | 100 struct ethhdr *ethhdr; in vl600_rx_fixup() local 175 ethhdr = (struct ethhdr *) skb->data; in vl600_rx_fixup() 176 if (be16_to_cpup(ðhdr->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/include/linux/ |
| H A D | if_ether.h | 25 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/hsr/ |
| H A D | hsr_main.h | 76 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 D | hsr_framereg.c | 262 struct ethhdr *ethhdr; in hsr_get_node() 269 ethhdr = (struct ethhdr *)skb_mac_header(skb); in hsr_get_node() 272 if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) { in hsr_get_node() 277 if (ether_addr_equal(node->macaddress_B, ethhdr->h_source)) { in hsr_seq_block_is_old() 286 if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) { in hsr_forget_seq_block() 296 if (ethhdr->h_proto == htons(ETH_P_PRP) || 297 ethhdr->h_proto == htons(ETH_P_HSR)) { 307 return hsr_add_node(hsr, node_db, ethhdr in hsr_get_seq_block() 228 struct ethhdr *ethhdr; hsr_get_node() local 349 struct ethhdr *ethhdr; hsr_handle_sup_frame() local [all...] |
| /linux/drivers/scsi/fnic/ |
| H A D | fip.h | 51 struct ethhdr eth; 62 struct ethhdr eth; 69 struct ethhdr eth; 94 struct ethhdr eth; 107 struct ethhdr eth; 138 fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth, in fnic_debug_dump_fip_frame() 155 fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth, in fnic_debug_dump_fip_frame()
|
| H A D | fnic_fcs.c | 123 struct ethhdr *ethhdr = (struct ethhdr *) rx_frame; in fnic_fdls_learn_fcoe_macs() local 130 ethhdr->h_dest[0], ethhdr->h_dest[1], in fnic_fdls_learn_fcoe_macs() 131 ethhdr->h_dest[2], ethhdr->h_dest[3], in fnic_fdls_learn_fcoe_macs() 132 ethhdr->h_dest[4], ethhdr->h_dest[5]); in fnic_fdls_learn_fcoe_macs() 140 fnic_fdls_set_fcoe_dstmac(fnic, ethhdr->h_source); in fnic_fdls_learn_fcoe_macs() 372 struct ethhdr *eh; in fnic_import_rq_eth_pkt() 376 eh = (struct ethhdr *) fp; in fnic_import_rq_eth_pkt() 447 struct ethhdr *eh; in fnic_rq_cmpl_frame_recv() 484 eh = (struct ethhdr *) fp; in fnic_rq_cmpl_frame_recv() 685 struct ethhdr *pethhdr; in fdls_send_fcoe_frame() [all …]
|
| /linux/net/ethernet/ |
| H 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() 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/tools/testing/selftests/bpf/progs/ |
| H A D | test_xdp_meta.c | 35 static bool check_smac(const struct ethhdr *eth) in check_smac() 110 src = bpf_dynptr_slice(&data, sizeof(struct ethhdr), NULL, META_SIZE); in ing_cls_dynptr_write() 148 src = bpf_dynptr_slice(&data, sizeof(struct ethhdr), NULL, META_SIZE); in ing_cls_dynptr_slice_rdwr() 210 bpf_skb_load_bytes(ctx, sizeof(struct ethhdr), payload, sizeof(payload)); in ing_cls_dynptr_offset_wr() 287 struct ethhdr *eth = ctx_ptr(ctx, data); in ing_xdp_zalloc_meta() 314 struct ethhdr *eth; in ing_xdp() 325 eth = (struct ethhdr *)data; in ing_xdp() 326 payload = data + sizeof(struct ethhdr); in ing_xdp() 351 struct ethhdr *eth = ctx_ptr(ctx, data); in clone_data_meta_survives_data_write() 381 struct ethhdr *eth = ctx_ptr(ctx, data); in clone_data_meta_survives_meta_write() [all …]
|
| H 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()
|
| H 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()
|
| H 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()
|
| H 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()
|
| H 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()
|
| /linux/samples/bpf/ |
| H 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() 85 struct ethhdr *orig_eth; in send_icmp4_too_big() 91 off += sizeof(struct ethhdr); in send_icmp4_too_big() 99 icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr)); in send_icmp4_too_big() 111 ICMP_TOOBIG_SIZE + headroom - sizeof(struct ethhdr)); in send_icmp4_too_big() 142 struct ethhdr *eth = data; in _xdp_icmp()
|
| H 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/net/ |
| H 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/ |
| H 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()
|