#ifndef _NITPICKER_ETH_H #define _NITPICKER_ETH_H /* * Ethernet Header */ struct eth_t { char dst[6]; /* Dest Ethernet */ char src[6]; /* Src Ethernet */ uint16 type; }; typedef struct { char dst[6]; char src[6]; uint16 filler1; /* 0x8100 */ uint16 vlanid; uint16 type; } vlan_t; /* 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VER | TYPE | CODE | SESSION_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | payload ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ typedef struct { char filler1; /* Ver / Type */ char code; uint16 sessionid; uint16 len; } pppoe_t; #endif