Home
last modified time | relevance | path

Searched refs:is_ethernet (Results 1 – 2 of 2) sorted by relevance

/aosp12/packages/modules/Connectivity/Tethering/bpf_progs/
H A Doffload.c114 if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_OK;
116 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0;
126 struct ethhdr* eth = is_ethernet ? data : NULL; // used iff is_ethernet
127 struct ipv6hdr* ip6 = is_ethernet ? (void*)(eth + 1) : data;
133 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK;
227 if (!is_ethernet) {
358 if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_OK;
363 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0;
374 struct iphdr* ip = is_ethernet ? (void*)(eth + 1) : data;
492 if (is_ethernet) __builtin_memcpy(k.dstMac, eth->h_dest, ETH_ALEN);
[all …]
/aosp12/system/netd/bpf_progs/
H A Dclatd.c42 static inline __always_inline int nat64(struct __sk_buff* skb, bool is_ethernet) {
43 const int l2_header_size = is_ethernet ? sizeof(struct ethhdr) : 0;
46 const struct ethhdr* const eth = is_ethernet ? data : NULL; // used iff is_ethernet
47 const struct ipv6hdr* const ip6 = is_ethernet ? (void*)(eth + 1) : data;
50 if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_OK;
59 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK;
94 if (is_ethernet) {
162 if (is_ethernet) {