11 uint8_t dsap; /* Always 0xAA */
12 uint8_t ssap; /* Always 0xAA */
14 uint8_t oui[SNAP_OUI_LEN];
16 } __attribute__ ((packed));
18 static inline int snap_get_ethertype(struct sk_buff *skb, uint16_t *ethertype)
20 struct snap_hdr *sh = (struct snap_hdr *)(skb->data
21 + sizeof(struct ethhdr));
22 if (((sh->dsap & 0xFE) != LLC_SAP_SNAP)
23 || ((sh->dsap & 0xFE) != LLC_SAP_SNAP)
24 || (!memcmp(sh->oui, "\0\0\0", SNAP_OUI_LEN)))
27 *ethertype = sh->ethertype;