home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / network / src_1218.zip / ARCNET.H < prev    next >
Text File  |  1990-11-10  |  1KB  |  46 lines

  1. /* Generic ARCnet constants and templates */
  2.  
  3. #ifndef    _ARCNET_H
  4. #define    _ARCNET_H
  5.  
  6. #ifndef    _GLOBAL_H
  7. #include "global.h"
  8. #endif
  9.  
  10. #ifndef    _MBUF_H
  11. #include "mbuf.h"
  12. #endif
  13.  
  14. #ifndef    _IFACE_H
  15. #include "iface.h"
  16. #endif
  17.  
  18. #define    AADDR_LEN    1
  19. /* Format of an ARCnet header */
  20. struct arc {
  21.     char source[AADDR_LEN];
  22.     char dest[AADDR_LEN];
  23.     char type;
  24. };
  25. #define    ARCLEN    3
  26.  
  27. /* ARCnet broadcast address */
  28. extern char ARC_bdcst[];
  29.  
  30. /* ARCnet type fields */
  31. #define    ARC_IP        0xf0    /* Type field for IP */
  32. #define    ARC_ARP        0xf1    /* Type field for ARP */
  33.  
  34. /* In file arcnet.c: */
  35. struct mbuf *htonarc __ARGS((struct arc *arc,struct mbuf *data));
  36. int ntoharc __ARGS((struct arc *arc,struct mbuf **bpp));
  37. char *parc __ARGS((char *out,char *addr));
  38. int garc __ARGS((char *out,char *cp));
  39. int anet_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  40.     int del,int tput,int rel));
  41. int anet_output __ARGS((struct iface *iface,char dest[],char source[],int16 type,
  42.     struct mbuf *data));
  43. void aproc __ARGS((struct iface *iface,struct mbuf *bp));
  44.  
  45. #endif    /* _ARCNET_H */
  46.