Rev | Line | |
---|
[9] | 1 | /* arp.h - Address Resolution Protocol packet format.
|
---|
| 2 | * Author: Kees J. Bot
|
---|
| 3 | * 16 Dec 2000
|
---|
| 4 | */
|
---|
| 5 | #ifndef ARP_H
|
---|
| 6 | #define ARP_H
|
---|
| 7 |
|
---|
| 8 | typedef struct arp46 {
|
---|
| 9 | ether_addr_t dstaddr;
|
---|
| 10 | ether_addr_t srcaddr;
|
---|
| 11 | ether_type_t ethtype; /* ARP_PROTO. */
|
---|
| 12 | u16_t hdr, pro; /* ARP_ETHERNET & ETH_IP_PROTO. */
|
---|
| 13 | u8_t hln, pln; /* 6 & 4. */
|
---|
| 14 | u16_t op; /* ARP_REQUEST or ARP_REPLY. */
|
---|
| 15 | ether_addr_t sha; /* Source hardware address. */
|
---|
| 16 | u8_t spa[4]; /* Source protocol address. */
|
---|
| 17 | ether_addr_t tha; /* Likewise for the target. */
|
---|
| 18 | u8_t tpa[4];
|
---|
| 19 | char padding[60 - (4*6 + 2*4 + 4*2 + 2*1)];
|
---|
| 20 | } arp46_t;
|
---|
| 21 |
|
---|
| 22 | #define ARP_ETHERNET 1 /* ARP on Ethernet. */
|
---|
| 23 | #define ARP_REQUEST 1 /* A request for an IP address. */
|
---|
| 24 | #define ARP_REPLY 2 /* A reply to a request. */
|
---|
| 25 |
|
---|
| 26 | #endif /* ARP_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.