|
|
1.1 ! root 1: /* ! 2: * Address resolution ! 3: */ ! 4: ! 5: #ifndef _ARP_ ! 6: #define _ARP_ ! 7: ! 8: #define MAX_HARDSIZE 6 ! 9: #define MAX_PRSIZE 4 ! 10: ! 11: struct ether_arp { ! 12: u_short arp_hrd; ! 13: #define ARPHRD_ETHER 1 ! 14: u_short arp_pro; ! 15: u_char arp_hln; ! 16: u_char arp_pln; ! 17: u_short arp_op; ! 18: #define ARPOP_REQUEST 1 ! 19: #define ARPOP_REPLY 2 ! 20: u_char arp_addr[2 * (MAX_HARDSIZE + MAX_PRSIZE)]; ! 21: }; ! 22: ! 23: static u_char broadaddr[MAX_HARDSIZE] = { ! 24: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, ! 25: }; ! 26: ! 27: struct arp { ! 28: u_char paddr[MAX_PRSIZE]; ! 29: u_char hdaddr[MAX_HARDSIZE]; ! 30: unsigned time; ! 31: }; ! 32: ! 33: static u_char pzero[MAX_PRSIZE]; ! 34: static u_char hzero[MAX_HARDSIZE]; ! 35: ! 36: #define NPROTO 2 ! 37: #define NPAIR 30 ! 38: ! 39: struct arp_dev { ! 40: dev_t pdev; ! 41: struct queue *rdq; ! 42: u_char hdaddr[MAX_HARDSIZE]; ! 43: int delim_count; ! 44: }; ! 45: ! 46: struct proto { ! 47: struct arp_dev *ptr; ! 48: u_short type; ! 49: u_char psize; ! 50: u_char phfirst; ! 51: struct arp pair[NPAIR]; ! 52: }; ! 53: ! 54: #ifndef CHANS_PER_UNIT ! 55: #define CHANS_PER_UNIT 8 ! 56: #endif ! 57: ! 58: #define physical(dev) ((dev) & ~(CHANS_PER_UNIT - 1)) ! 59: ! 60: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.