17c478bd9Sstevel@tonic-gate #ifndef	_IF_ARP_H
27c478bd9Sstevel@tonic-gate #define	_IF_ARP_H
37c478bd9Sstevel@tonic-gate 
47c478bd9Sstevel@tonic-gate #include "types.h"
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate #define ARP_REQUEST	1
77c478bd9Sstevel@tonic-gate #define ARP_REPLY	2
87c478bd9Sstevel@tonic-gate 
97c478bd9Sstevel@tonic-gate #ifndef	MAX_ARP_RETRIES
107c478bd9Sstevel@tonic-gate #define MAX_ARP_RETRIES		20
117c478bd9Sstevel@tonic-gate #endif
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate /*
147c478bd9Sstevel@tonic-gate  * A pity sipaddr and tipaddr are not longword aligned or we could use
157c478bd9Sstevel@tonic-gate  * in_addr. No, I don't want to use #pragma packed.
167c478bd9Sstevel@tonic-gate  */
177c478bd9Sstevel@tonic-gate struct arprequest {
187c478bd9Sstevel@tonic-gate 	uint16_t hwtype;
197c478bd9Sstevel@tonic-gate 	uint16_t protocol;
207c478bd9Sstevel@tonic-gate 	uint8_t  hwlen;
217c478bd9Sstevel@tonic-gate 	uint8_t  protolen;
227c478bd9Sstevel@tonic-gate 	uint16_t opcode;
237c478bd9Sstevel@tonic-gate 	uint8_t  shwaddr[6];
247c478bd9Sstevel@tonic-gate 	uint8_t  sipaddr[4];
257c478bd9Sstevel@tonic-gate 	uint8_t  thwaddr[6];
267c478bd9Sstevel@tonic-gate 	uint8_t  tipaddr[4];
277c478bd9Sstevel@tonic-gate };
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #endif	/* _IF_ARP_H */
30