home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / kboot22.zoo / kboot22.2 / appletalk.h < prev    next >
C/C++ Source or Header  |  1991-02-22  |  2KB  |  64 lines

  1. /*
  2.  * $Header: /tmp_mnt/home/src/rand/etc/kboot/RCS/appletalk.h,v 1.1 91/01/29 17:37:31 root Exp $
  3.  *
  4.  * $Log:    appletalk.h,v $
  5.  * Revision 1.1  91/01/29  17:37:31  root
  6.  * Initial revision
  7.  * 
  8.  */
  9.  
  10. /*
  11.  * appletalk.h - Definitions for Appletalk protocols.
  12.  */
  13. #define AT_Broadcast    0xFF        /* Broadcast appletalk address    */
  14. #define AARP        0x80F3        /* AARP protocol type        */
  15. #define H_Ethernet    1        /* Hardware type for ethernet    */
  16. #define HL_Ethernet    6        /* Ethernet address length    */
  17. #define P_AppleTalk    0x809B        /* Protocol type for appletalk    */
  18. #define PL_AppleTalk    4        /* Appletalk address length    */
  19. #define AReqTicks    2        /* # of ticks between requests    */
  20. #define AReqTries    6        /* # of tries on requests    */
  21. /*
  22.  * Inside Appletalk suggests APrbTicks should be 2 and APrbTries 20.
  23.  * Our hosts don't always respond that fast, and that seems like way
  24.  * too many retries, so we'll slow down the timeout and decrease the
  25.  * retries.
  26.  */
  27. #define APrbTicks    20        /* # of ticks between probes    */
  28. #define APrbTries    5        /* # of tries on probes        */
  29.  
  30. /*
  31.  * Appletalk ARP header.
  32.  */
  33. struct ether_aarp {
  34.   u_short        aarp_hrd;    /* Hardware type        */
  35.   u_short        aarp_pro;    /* Protocol type        */
  36.   u_char        aarp_hln;    /* Hardware address length    */
  37.   u_char         aarp_pln;    /* Protocol address length    */
  38.   u_short        aarp_op;    /* Command            */
  39. #define AARPReq        1
  40. #define AARPResp    2
  41. #define AARPProbe    3
  42.   struct ether_addr    aarp_sha;    /* Sender hardware address    */
  43.   u_char        aarp_spa[4];    /* Sender protocol address    */
  44.   struct ether_addr    aarp_tha;    /* Target hardware address    */
  45.   u_char        aarp_tpa[4];    /* Target protocol address    */
  46. };
  47.  
  48. struct aarp_packet {
  49.   struct ether_header    ap_ehdr;
  50.   struct ether_aarp    ap_ahdr;
  51. };
  52. #define ap_dhost    ap_ehdr.ether_dhost
  53. #define ap_shost    ap_ehdr.ether_shost
  54. #define ap_type        ap_ehdr.ether_type
  55. #define ap_hrd        ap_ahdr.aarp_hrd
  56. #define ap_pro        ap_ahdr.aarp_pro
  57. #define ap_hln        ap_ahdr.aarp_hln
  58. #define ap_pln        ap_ahdr.aarp_pln
  59. #define ap_op        ap_ahdr.aarp_op
  60. #define ap_sha        ap_ahdr.aarp_sha
  61. #define ap_spa        ap_ahdr.aarp_spa
  62. #define ap_tha        ap_ahdr.aarp_tha
  63. #define ap_tpa        ap_ahdr.aarp_tpa
  64.