1*1b8adde7SWilliam Kucharski #ifndef _IF_ARP_H 2*1b8adde7SWilliam Kucharski #define _IF_ARP_H 3*1b8adde7SWilliam Kucharski 4*1b8adde7SWilliam Kucharski #include "types.h" 5*1b8adde7SWilliam Kucharski 6*1b8adde7SWilliam Kucharski #define ARP_REQUEST 1 7*1b8adde7SWilliam Kucharski #define ARP_REPLY 2 8*1b8adde7SWilliam Kucharski 9*1b8adde7SWilliam Kucharski #ifndef MAX_ARP_RETRIES 10*1b8adde7SWilliam Kucharski #define MAX_ARP_RETRIES 20 11*1b8adde7SWilliam Kucharski #endif 12*1b8adde7SWilliam Kucharski 13*1b8adde7SWilliam Kucharski /* 14*1b8adde7SWilliam Kucharski * A pity sipaddr and tipaddr are not longword aligned or we could use 15*1b8adde7SWilliam Kucharski * in_addr. No, I don't want to use #pragma packed. 16*1b8adde7SWilliam Kucharski */ 17*1b8adde7SWilliam Kucharski struct arprequest { 18*1b8adde7SWilliam Kucharski uint16_t hwtype; 19*1b8adde7SWilliam Kucharski uint16_t protocol; 20*1b8adde7SWilliam Kucharski uint8_t hwlen; 21*1b8adde7SWilliam Kucharski uint8_t protolen; 22*1b8adde7SWilliam Kucharski uint16_t opcode; 23*1b8adde7SWilliam Kucharski uint8_t shwaddr[6]; 24*1b8adde7SWilliam Kucharski uint8_t sipaddr[4]; 25*1b8adde7SWilliam Kucharski uint8_t thwaddr[6]; 26*1b8adde7SWilliam Kucharski uint8_t tipaddr[4]; 27*1b8adde7SWilliam Kucharski }; 28*1b8adde7SWilliam Kucharski 29*1b8adde7SWilliam Kucharski #endif /* _IF_ARP_H */ 30