Home
last modified time | relevance | path

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

/net/ethernet/
Deth.c85 struct ethhdr *eth = (struct ethhdr *)skb_push(skb, ETH_HLEN); in eth_header() local
88 eth->h_proto = htons(type); in eth_header()
90 eth->h_proto = htons(len); in eth_header()
98 memcpy(eth->h_source, saddr, ETH_ALEN); in eth_header()
101 memcpy(eth->h_dest, daddr, ETH_ALEN); in eth_header()
110 eth_zero_addr(eth->h_dest); in eth_header()
129 const struct ethhdr *eth = (const struct ethhdr *)data; in eth_get_headlen() local
133 if (unlikely(len < sizeof(*eth))) in eth_get_headlen()
137 if (!skb_flow_dissect_flow_keys_buf(&keys, data, eth->h_proto, in eth_get_headlen()
138 sizeof(*eth), len, flags)) in eth_get_headlen()
[all …]
DMakefile5 obj-y += eth.o
/net/openvswitch/
Dflow.c341 key->eth.vlan.tci = 0; in parse_vlan()
342 key->eth.vlan.tpid = 0; in parse_vlan()
343 key->eth.cvlan.tci = 0; in parse_vlan()
344 key->eth.cvlan.tpid = 0; in parse_vlan()
347 key->eth.vlan.tci = htons(skb->vlan_tci); in parse_vlan()
348 key->eth.vlan.tpid = skb->vlan_proto; in parse_vlan()
351 res = parse_vlan_tag(skb, &key->eth.vlan); in parse_vlan()
357 res = parse_vlan_tag(skb, &key->eth.cvlan); in parse_vlan()
501 struct ethhdr *eth; in key_extract() local
511 eth = eth_hdr(skb); in key_extract()
[all …]
Dflow_netlink.c149 if (match->key->eth.type == htons(ETH_P_ARP) in match_validate()
150 || match->key->eth.type == htons(ETH_P_RARP)) { in match_validate()
152 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
156 if (eth_p_mpls(match->key->eth.type)) { in match_validate()
158 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
162 if (match->key->eth.type == htons(ETH_P_IP)) { in match_validate()
164 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
197 if (match->key->eth.type == htons(ETH_P_IPV6)) { in match_validate()
199 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate()
827 SW_FLOW_KEY_PUT(match, eth.vlan.tpid, tpid, is_mask); in encode_vlan_from_nlattrs()
[all …]
Dactions.c139 key->eth.type = htons(0); in invalidate_flow_key()
144 return !!key->eth.type; in is_flow_key_valid()
259 key->eth.vlan.tci = 0; in pop_vlan()
260 key->eth.vlan.tpid = 0; in pop_vlan()
271 key->eth.vlan.tci = vlan->vlan_tci; in push_vlan()
272 key->eth.vlan.tpid = vlan->vlan_tpid; in push_vlan()
309 ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source); in set_eth_addr()
310 ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest); in set_eth_addr()
782 __be16 ethertype = key->eth.type; in do_output()
Dconntrack.c80 switch (ntohs(key->eth.type)) { in key_to_nfproto()
357 if (key->eth.type == htons(ETH_P_IP)) { in handle_fragments()
367 } else if (key->eth.type == htons(ETH_P_IPV6)) { in handle_fragments()
622 if (key->eth.type == htons(ETH_P_IP)) in ovs_nat_update_key()
624 else if (key->eth.type == htons(ETH_P_IPV6)) in ovs_nat_update_key()
644 if (key->eth.type == htons(ETH_P_IP)) in ovs_nat_update_key()
646 else if (key->eth.type == htons(ETH_P_IPV6)) in ovs_nat_update_key()
Dflow.h80 } eth; member
Ddatapath.c566 struct ethhdr *eth; in ovs_packet_cmd_execute() local
588 eth = eth_hdr(packet); in ovs_packet_cmd_execute()
593 if (eth_proto_is_802_3(eth->h_proto)) in ovs_packet_cmd_execute()
594 packet->protocol = eth->h_proto; in ovs_packet_cmd_execute()
/net/sched/
Dcls_flower.c35 struct flow_dissector_key_eth_addrs eth; member
415 fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, in fl_set_key()
416 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_set_key()
417 sizeof(key->eth.dst)); in fl_set_key()
418 fl_set_key_val(tb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC, in fl_set_key()
419 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_set_key()
420 sizeof(key->eth.src)); in fl_set_key()
570 FLOW_DISSECTOR_KEY_ETH_ADDRS, eth); in fl_init_dissector()
871 if (fl_dump_key_val(skb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, in fl_dump()
872 mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, in fl_dump()
[all …]
/net/bridge/
Dbr_multicast.c369 struct ethhdr *eth; in br_ip4_multicast_alloc_query() local
372 skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*iph) + in br_ip4_multicast_alloc_query()
380 eth = eth_hdr(skb); in br_ip4_multicast_alloc_query()
382 ether_addr_copy(eth->h_source, br->dev->dev_addr); in br_ip4_multicast_alloc_query()
383 eth->h_dest[0] = 1; in br_ip4_multicast_alloc_query()
384 eth->h_dest[1] = 0; in br_ip4_multicast_alloc_query()
385 eth->h_dest[2] = 0x5e; in br_ip4_multicast_alloc_query()
386 eth->h_dest[3] = 0; in br_ip4_multicast_alloc_query()
387 eth->h_dest[4] = 0; in br_ip4_multicast_alloc_query()
388 eth->h_dest[5] = 1; in br_ip4_multicast_alloc_query()
[all …]
Dbr_private.h639 struct ethhdr *eth) in br_multicast_querier_exists() argument
641 switch (eth->h_proto) { in br_multicast_querier_exists()
719 struct ethhdr *eth) in br_multicast_querier_exists() argument
/net/bridge/netfilter/
Dnft_reject_bridge.c29 struct ethhdr *eth; in nft_reject_br_push_etherhdr() local
31 eth = (struct ethhdr *)skb_push(nskb, ETH_HLEN); in nft_reject_br_push_etherhdr()
33 ether_addr_copy(eth->h_source, eth_hdr(oldskb)->h_dest); in nft_reject_br_push_etherhdr()
34 ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source); in nft_reject_br_push_etherhdr()
35 eth->h_proto = eth_hdr(oldskb)->h_proto; in nft_reject_br_push_etherhdr()
/net/core/
Dnetpoll.c390 struct ethhdr *eth; in netpoll_send_udp() local
444 eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); in netpoll_send_udp()
446 skb->protocol = eth->h_proto = htons(ETH_P_IPV6); in netpoll_send_udp()
473 eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); in netpoll_send_udp()
475 skb->protocol = eth->h_proto = htons(ETH_P_IP); in netpoll_send_udp()
478 ether_addr_copy(eth->h_source, np->dev->dev_addr); in netpoll_send_udp()
479 ether_addr_copy(eth->h_dest, np->remote_mac); in netpoll_send_udp()
Dflow_dissector.c151 struct ethhdr *eth = eth_hdr(skb); in __skb_flow_dissect() local
157 memcpy(key_eth_addrs, &eth->h_dest, sizeof(*key_eth_addrs)); in __skb_flow_dissect()
423 const struct ethhdr *eth; in __skb_flow_dissect() local
426 eth = __skb_header_pointer(skb, nhoff + offset, in __skb_flow_dissect()
429 if (!eth) in __skb_flow_dissect()
431 proto = eth->h_proto; in __skb_flow_dissect()
432 offset += sizeof(*eth); in __skb_flow_dissect()
Dpktgen.c2656 struct ethhdr *eth; in process_ipsec() local
2678 eth = (struct ethhdr *)skb_push(skb, ETH_HLEN); in process_ipsec()
2679 memcpy(eth, pkt_dev->hh, 2 * ETH_ALEN); in process_ipsec()
2680 eth->h_proto = protocol; in process_ipsec()
2813 __u8 *eth; in fill_packet_ipv4() local
2847 eth = (__u8 *) skb_push(skb, 14); in fill_packet_ipv4()
2878 memcpy(eth, pkt_dev->hh, 12); in fill_packet_ipv4()
2879 *(__be16 *) & eth[12] = protocol; in fill_packet_ipv4()
2940 __u8 *eth; in fill_packet_ipv6() local
2974 eth = (__u8 *) skb_push(skb, 14); in fill_packet_ipv6()
[all …]
Ddev.c2665 struct ethhdr *eth; in skb_network_protocol() local
2670 eth = (struct ethhdr *)skb->data; in skb_network_protocol()
2671 type = eth->h_proto; in skb_network_protocol()
4797 const struct ethhdr *eth; in napi_frags_skb() local
4798 unsigned int hlen = sizeof(*eth); in napi_frags_skb()
4805 eth = skb_gro_header_fast(skb, 0); in napi_frags_skb()
4807 eth = skb_gro_header_slow(skb, hlen, 0); in napi_frags_skb()
4808 if (unlikely(!eth)) { in napi_frags_skb()
4826 skb->protocol = eth->h_proto; in napi_frags_skb()
/net/wireless/
Dutil.c752 struct ethhdr eth; in ieee80211_amsdu_to_8023s() local
762 skb_copy_bits(skb, offset, &eth, sizeof(eth)); in ieee80211_amsdu_to_8023s()
763 len = ntohs(eth.h_proto); in ieee80211_amsdu_to_8023s()
776 if ((check_da && !is_multicast_ether_addr(eth.h_dest) && in ieee80211_amsdu_to_8023s()
777 !ether_addr_equal(check_da, eth.h_dest)) || in ieee80211_amsdu_to_8023s()
778 (check_sa && !ether_addr_equal(check_sa, eth.h_source))) { in ieee80211_amsdu_to_8023s()
806 eth.h_proto = htons(ethertype); in ieee80211_amsdu_to_8023s()
810 memcpy(skb_push(frame, sizeof(eth)), &eth, sizeof(eth)); in ieee80211_amsdu_to_8023s()
/net/irda/irlan/
Dirlan_common.c69 static bool eth; /* Use "eth" or "irlan" name for devices */ variable
200 dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); in irlan_open()
1169 module_param(eth, bool, 0);
1170 MODULE_PARM_DESC(eth, "Name devices ethX (0) or irlanX (1)");
/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/mac80211/
Dtx.c3256 struct ethhdr eth; in ieee80211_xmit_fast() local
3315 memcpy(&eth, skb->data, ETH_HLEN - 2); in ieee80211_xmit_fast()
3318 memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); in ieee80211_xmit_fast()
3319 memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); in ieee80211_xmit_fast()