__be16eth_type_trans(structsk_buff*skb,structnet_device*dev){structethhdr*eth;skb->dev=dev;eth=eth_hdr(skb);if(netdev_uses_dsa_tags(dev))returnhtons(ETH_P_DSA);if(netdev_uses_trailer_tags(dev))returnhtons(ETH_P_TRAILER);if(ntohs(eth->h_proto)>=1536)returneth->h_proto;} 1. 2...
__be16eth_type_trans(structsk_buff*skb,structnet_device*dev){structethhdr*eth;skb->dev=dev;eth=eth_hdr(skb);if(netdev_uses_dsa_tags(dev))returnhtons(ETH_P_DSA);if(netdev_uses_trailer_tags(dev))returnhtons(ETH_P_TRAILER);if(ntohs(eth->h_proto)>=1536)returneth->h_proto;} 1. 2...
1__be16 eth_type_trans(structsk_buff *skb,structnet_device *dev)2{3structethhdr *eth;45skb->dev =dev;6eth =eth_hdr(skb);78if(netdev_uses_dsa_tags(dev))9returnhtons(ETH_P_DSA);1011if(netdev_uses_trailer_tags(dev))12returnhtons(ETH_P_TRAILER);1314if( ntohs(eth->h_proto) >=...
structethhdr{ unsignedcharh_dest[ETH_ALEN]; unsignedcharh_source[ETH_ALEN]; __be16 h_proto; } __attribute__((packed)); structether_header { u_int8_t ether_dhost[ETH_ALEN]; // destination eth addr u_int8_t ether_shost[ETH_ALEN]; // source ether addr u_int16_t ether_type; ...