Home
last modified time | relevance | path

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

/net/ethernet/
Deth.c82 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header() local
85 eth->h_proto = htons(type); in eth_header()
87 eth->h_proto = htons(len); in eth_header()
95 memcpy(eth->h_source, saddr, ETH_ALEN); in eth_header()
98 memcpy(eth->h_dest, daddr, ETH_ALEN); in eth_header()
107 eth_zero_addr(eth->h_dest); in eth_header()
127 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen() local
131 if (unlikely(len < sizeof(*eth))) in eth_get_headlen()
136 eth->h_proto, sizeof(*eth), in eth_get_headlen()
138 return max_t(u32, keys.control.thoff, sizeof(*eth)); in eth_get_headlen()
[all …]
DMakefile6 obj-y += eth.o
/net/openvswitch/
Dflow.c344 key->eth.vlan.tci = 0; in clear_vlan()
345 key->eth.vlan.tpid = 0; in clear_vlan()
346 key->eth.cvlan.tci = 0; in clear_vlan()
347 key->eth.cvlan.tpid = 0; in clear_vlan()
355 key->eth.vlan.tci = htons(skb->vlan_tci) | htons(VLAN_CFI_MASK); in parse_vlan()
356 key->eth.vlan.tpid = skb->vlan_proto; in parse_vlan()
359 res = parse_vlan_tag(skb, &key->eth.vlan, true); in parse_vlan()
365 res = parse_vlan_tag(skb, &key->eth.cvlan, false); in parse_vlan()
543 if (key->eth.type == htons(ETH_P_IP)) { in key_extract_l3l4()
618 } else if (key->eth.type == htons(ETH_P_ARP) || in key_extract_l3l4()
[all …]
Dflow_netlink.c182 if (match->key->eth.type == htons(ETH_P_ARP) in match_validate()
183 || match->key->eth.type == htons(ETH_P_RARP)) { in match_validate()
185 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
189 if (eth_p_mpls(match->key->eth.type)) { in match_validate()
191 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
195 if (match->key->eth.type == htons(ETH_P_IP)) { in match_validate()
197 if (match->mask && match->mask->key.eth.type == htons(0xffff)) { in match_validate()
232 if (match->key->eth.type == htons(ETH_P_IPV6)) { in match_validate()
234 if (match->mask && match->mask->key.eth.type == htons(0xffff)) { in match_validate()
283 if (match->key->eth.type == htons(ETH_P_NSH)) { in match_validate()
[all …]
Dflow.h81 } eth; member
157 return key->eth.type == htons(ETH_P_IPV6) && in sw_flow_key_is_nd()
Dactions.c224 key->eth.vlan.tci = 0; in pop_vlan()
225 key->eth.vlan.tpid = 0; in pop_vlan()
236 key->eth.vlan.tci = vlan->vlan_tci; in push_vlan()
237 key->eth.vlan.tpid = vlan->vlan_tpid; in push_vlan()
274 ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source); in set_eth_addr()
275 ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest); in set_eth_addr()
866 if (key->eth.type == htons(ETH_P_IP)) { in ovs_fragment()
882 } else if (key->eth.type == htons(ETH_P_IPV6)) { in ovs_fragment()
901 ovs_vport_name(vport), ntohs(key->eth.type), mru, in ovs_fragment()
Dconntrack.c107 switch (ntohs(key->eth.type)) { in key_to_nfproto()
207 if (key->eth.type == htons(ETH_P_IP) && in __ovs_ct_update_key()
213 } else if (key->eth.type == htons(ETH_P_IPV6) && in __ovs_ct_update_key()
301 if (swkey->eth.type == htons(ETH_P_IP)) { in ovs_ct_put_key()
314 } else if (swkey->eth.type == htons(ETH_P_IPV6)) { in ovs_ct_put_key()
503 if (key->eth.type == htons(ETH_P_IP)) { in handle_fragments()
513 } else if (key->eth.type == htons(ETH_P_IPV6)) { in handle_fragments()
743 if (key->eth.type == htons(ETH_P_IP)) in ovs_nat_update_key()
745 else if (key->eth.type == htons(ETH_P_IPV6)) in ovs_nat_update_key()
765 if (key->eth.type == htons(ETH_P_IP)) in ovs_nat_update_key()
[all …]
Dopenvswitch_trace.h58 __entry->key_eth_type = key->eth.type;
128 __entry->key_eth_type = key->eth.type;
/net/bridge/netfilter/
Dnft_reject_bridge.c26 struct ethhdr *eth; in nft_reject_br_push_etherhdr() local
28 eth = skb_push(nskb, ETH_HLEN); in nft_reject_br_push_etherhdr()
30 ether_addr_copy(eth->h_source, eth_hdr(oldskb)->h_dest); in nft_reject_br_push_etherhdr()
31 ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source); in nft_reject_br_push_etherhdr()
32 eth->h_proto = eth_hdr(oldskb)->h_proto; in nft_reject_br_push_etherhdr()
/net/netfilter/
Dnft_reject_netdev.c87 struct ethhdr *eth = eth_hdr(pkt->skb); in nft_reject_netdev_eval() local
89 const unsigned char *dest = eth->h_dest; in nft_reject_netdev_eval()
95 switch (eth->h_proto) { in nft_reject_netdev_eval()
/net/core/
Dnetpoll.c406 struct ethhdr *eth; in netpoll_send_udp() local
461 eth = skb_push(skb, ETH_HLEN); in netpoll_send_udp()
463 skb->protocol = eth->h_proto = htons(ETH_P_IPV6); in netpoll_send_udp()
490 eth = skb_push(skb, ETH_HLEN); in netpoll_send_udp()
492 skb->protocol = eth->h_proto = htons(ETH_P_IP); in netpoll_send_udp()
495 ether_addr_copy(eth->h_source, np->dev->dev_addr); in netpoll_send_udp()
496 ether_addr_copy(eth->h_dest, np->remote_mac); in netpoll_send_udp()
Dflow_dissector.c592 const struct ethhdr *eth; in __skb_flow_dissect_gre() local
595 eth = __skb_header_pointer(skb, *p_nhoff + offset, in __skb_flow_dissect_gre()
598 if (!eth) in __skb_flow_dissect_gre()
600 *p_proto = eth->h_proto; in __skb_flow_dissect_gre()
601 offset += sizeof(*eth); in __skb_flow_dissect_gre()
673 struct ethhdr eth; in __skb_flow_dissect_batadv() member
687 *p_proto = hdr->eth.h_proto; in __skb_flow_dissect_batadv()
1027 struct ethhdr *eth = eth_hdr(skb); in __skb_flow_dissect() local
1033 memcpy(key_eth_addrs, &eth->h_dest, sizeof(*key_eth_addrs)); in __skb_flow_dissect()
Dpktgen.c2698 struct ethhdr *eth; in process_ipsec() local
2720 eth = skb_push(skb, ETH_HLEN); in process_ipsec()
2721 memcpy(eth, pkt_dev->hh, 2 * ETH_ALEN); in process_ipsec()
2722 eth->h_proto = protocol; in process_ipsec()
2863 __u8 *eth; in fill_packet_ipv4() local
2897 eth = skb_push(skb, 14); in fill_packet_ipv4()
2929 memcpy(eth, pkt_dev->hh, 12); in fill_packet_ipv4()
2930 *(__be16 *) & eth[12] = protocol; in fill_packet_ipv4()
2991 __u8 *eth; in fill_packet_ipv6() local
3025 eth = skb_push(skb, 14); in fill_packet_ipv6()
[all …]
Ddev.c3337 struct ethhdr *eth; in skb_network_protocol() local
3342 eth = (struct ethhdr *)skb->data; in skb_network_protocol()
3343 type = eth->h_proto; in skb_network_protocol()
4739 struct ethhdr *eth; in bpf_prog_run_generic_xdp() local
4760 eth = (struct ethhdr *)xdp->data; in bpf_prog_run_generic_xdp()
4761 orig_host = ether_addr_equal_64bits(eth->h_dest, skb->dev->dev_addr); in bpf_prog_run_generic_xdp()
4762 orig_bcast = is_multicast_ether_addr_64bits(eth->h_dest); in bpf_prog_run_generic_xdp()
4763 orig_eth_type = eth->h_proto; in bpf_prog_run_generic_xdp()
4787 eth = (struct ethhdr *)xdp->data; in bpf_prog_run_generic_xdp()
4788 if ((orig_eth_type != eth->h_proto) || in bpf_prog_run_generic_xdp()
[all …]
Dskbuff.c5900 struct ethhdr *eth; in skb_eth_push() local
5906 err = skb_cow_head(skb, sizeof(*eth)); in skb_eth_push()
5910 skb_push(skb, sizeof(*eth)); in skb_eth_push()
5914 eth = eth_hdr(skb); in skb_eth_push()
5915 ether_addr_copy(eth->h_dest, dst); in skb_eth_push()
5916 ether_addr_copy(eth->h_source, src); in skb_eth_push()
5917 eth->h_proto = skb->protocol; in skb_eth_push()
5919 skb_postpush_rcsum(skb, eth, sizeof(*eth)); in skb_eth_push()
/net/wireless/
Dutil.c759 struct ethhdr eth; in ieee80211_amsdu_to_8023s() local
769 skb_copy_bits(skb, offset, &eth, sizeof(eth)); in ieee80211_amsdu_to_8023s()
770 len = ntohs(eth.h_proto); in ieee80211_amsdu_to_8023s()
779 if (ether_addr_equal(eth.h_dest, rfc1042_header)) in ieee80211_amsdu_to_8023s()
786 if ((check_da && !is_multicast_ether_addr(eth.h_dest) && in ieee80211_amsdu_to_8023s()
787 !ether_addr_equal(check_da, eth.h_dest)) || in ieee80211_amsdu_to_8023s()
788 (check_sa && !ether_addr_equal(check_sa, eth.h_source))) { in ieee80211_amsdu_to_8023s()
816 eth.h_proto = htons(ethertype); in ieee80211_amsdu_to_8023s()
820 memcpy(skb_push(frame, sizeof(eth)), &eth, sizeof(eth)); in ieee80211_amsdu_to_8023s()
/net/mac80211/
Dwme.c146 const struct ethhdr *eth = (void *)skb->data; in __ieee80211_select_queue() local
152 !is_multicast_ether_addr(eth->h_dest)) || in __ieee80211_select_queue()
Dtx.c3512 struct ethhdr eth; in ieee80211_xmit_fast() local
3571 memcpy(&eth, skb->data, ETH_HLEN - 2); in ieee80211_xmit_fast()
3574 memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); in ieee80211_xmit_fast()
3575 memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); in ieee80211_xmit_fast()
4264 struct ethhdr *eth; in ieee80211_change_da() local
4271 eth = (void *)skb->data; in ieee80211_change_da()
4272 ether_addr_copy(eth->h_dest, sta->sta.addr); in ieee80211_change_da()
4281 const struct ethhdr *eth = (void *)skb->data; in ieee80211_multicast_to_unicast() local
4285 if (likely(!is_multicast_ether_addr(eth->h_dest))) in ieee80211_multicast_to_unicast()
4305 ethertype = eth->h_proto; in ieee80211_multicast_to_unicast()
[all …]
/net/bridge/
Dbr_multicast.c816 struct ethhdr *eth; in br_ip4_multicast_alloc_query() local
840 pkt_size = sizeof(*eth) + sizeof(*iph) + 4 + igmp_hdr_size; in br_ip4_multicast_alloc_query()
853 eth = eth_hdr(skb); in br_ip4_multicast_alloc_query()
855 ether_addr_copy(eth->h_source, brmctx->br->dev->dev_addr); in br_ip4_multicast_alloc_query()
856 ip_eth_mc_map(ip_dst, eth->h_dest); in br_ip4_multicast_alloc_query()
857 eth->h_proto = htons(ETH_P_IP); in br_ip4_multicast_alloc_query()
858 skb_put(skb, sizeof(*eth)); in br_ip4_multicast_alloc_query()
862 iph->tot_len = htons(pkt_size - sizeof(*eth)); in br_ip4_multicast_alloc_query()
939 __skb_pull(skb, sizeof(*eth)); in br_ip4_multicast_alloc_query()
967 struct ethhdr *eth; in br_ip6_multicast_alloc_query() local
[all …]
Dbr_private.h1074 struct ethhdr *eth, in br_multicast_querier_exists() argument
1077 switch (eth->h_proto) { in br_multicast_querier_exists()
1323 struct ethhdr *eth, in br_multicast_querier_exists() argument
/net/sched/
Dcls_flower.c44 struct flow_dissector_key_eth_addrs eth; member
1528 fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, in fl_set_key()
1529 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_set_key()
1530 sizeof(key->eth.dst)); in fl_set_key()
1531 fl_set_key_val(tb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC, in fl_set_key()
1532 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_set_key()
1533 sizeof(key->eth.src)); in fl_set_key()
1795 FLOW_DISSECTOR_KEY_ETH_ADDRS, eth); in fl_init_dissector()
2879 if (fl_dump_key_val(skb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, in fl_dump_key()
2880 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_dump_key()
[all …]
/net/xfrm/
Dxfrm_output.c657 const struct ethhdr *eth; in xfrm_get_inner_ipproto() local
689 eth = (struct ethhdr *)skb_inner_mac_header(skb); in xfrm_get_inner_ipproto()
691 switch (ntohs(eth->h_proto)) { in xfrm_get_inner_ipproto()
/net/atm/
Dmpc.c574 struct ethhdr *eth; in mpc_send_packet() local
583 eth = (struct ethhdr *)skb->data; in mpc_send_packet()
584 if (eth->h_proto != htons(ETH_P_IP)) in mpc_send_packet()
595 if (ether_addr_equal(eth->h_dest, mpc->mps_macs + i * ETH_ALEN)) in mpc_send_packet()
/net/bpf/
Dtest_run.c859 const struct ethhdr *eth; in bpf_prog_test_run_flow_dissector() local
878 eth = (struct ethhdr *)data; in bpf_prog_test_run_flow_dissector()
901 retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN, in bpf_prog_test_run_flow_dissector()
/net/ipv6/
Dseg6_local.c337 struct ethhdr *eth; in input_action_end_dx2() local
346 eth = (struct ethhdr *)skb->data; in input_action_end_dx2()
352 if (!eth_proto_is_802_3(eth->h_proto)) in input_action_end_dx2()
379 skb->protocol = eth->h_proto; in input_action_end_dx2()