home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / packetdrivers.tar.gz / pd.tar / src / pktdrvr.h < prev    next >
C/C++ Source or Header  |  1995-06-25  |  3KB  |  80 lines

  1. #ifndef    CL_ETHERNET
  2.  
  3. /* Packet driver interface classes */
  4. #define    CL_NONE        0
  5. #define    CL_ETHERNET    1
  6. #define    CL_PRONET_10    2
  7. #define    CL_IEEE8025    3
  8. #define    CL_OMNINET    4
  9. #define    CL_APPLETALK    5
  10. #define    CL_SERIAL_LINE    6
  11. #define    CL_STARLAN    7
  12. #define    CL_ARCNET    8
  13. #define    CL_AX25        9
  14. #define    CL_KISS        10
  15. #define CL_IEEE8023    11
  16. #define CL_FDDI     12
  17. #define CL_INTERNET_X25 13
  18. #define CL_LANSTAR    14
  19. #define CL_SLFP     15
  20. #define    CL_NETROM    16
  21. #define NCLASS        17
  22.  
  23. /* Packet driver interface types (not a complete list) */
  24. #define    TC500        1
  25. #define    PC2000        10
  26. #define    WD8003        14
  27. #define    PC8250        15
  28. #define    ANYTYPE        0xffff
  29.  
  30. /* Packet driver function call numbers. From Appendix B. */
  31. #define    DRIVER_INFO        1
  32. #define    ACCESS_TYPE        2
  33. #define    RELEASE_TYPE        3
  34. #define    SEND_PKT        4
  35. #define    TERMINATE        5
  36. #define    GET_ADDRESS        6
  37. #define    RESET_INTERFACE        7
  38. #define GET_PARAMETERS        10
  39. #define AS_SEND_PKT        11
  40. #define    SET_RCV_MODE        20
  41. #define    GET_RCV_MODE        21
  42. #define    SET_MULTICAST_LIST    22
  43. #define    GET_MULTICAST_LIST    23
  44. #define    GET_STATISTICS        24
  45. #define SET_ADDRESS        25
  46.  
  47. /* Packet driver error return codes. From Appendix C. */
  48.  
  49. #define    NO_ERROR    0
  50. #define    BAD_HANDLE    1    /* invalid handle number */
  51. #define    NO_CLASS    2    /* no interfaces of specified class found */
  52. #define    NO_TYPE        3    /* no interfaces of specified type found */
  53. #define    NO_NUMBER    4    /* no interfaces of specified number found */
  54. #define    BAD_TYPE    5    /* bad packet type specified */
  55. #define    NO_MULTICAST    6    /* this interface does not support multicast */
  56. #define    CANT_TERMINATE    7    /* this packet driver cannot terminate */
  57. #define    BAD_MODE    8    /* an invalid receiver mode was specified */
  58. #define    NO_SPACE    9    /* operation failed because of insufficient space */
  59. #define    TYPE_INUSE    10    /* the type had previously been accessed, and not released */
  60. #define    BAD_COMMAND    11    /* the command was out of range, or not    implemented */
  61. #define    CANT_SEND    12    /* the packet couldn't be sent (usually    hardware error) */
  62. #define CANT_SET    13    /* hardware address couldn't be changed (> 1 handle open) */
  63. #define BAD_ADDRESS    14    /* hardware address has bad length or format */
  64. #define CANT_RESET    15    /* couldn't reset interface (> 1 handle open) */
  65.  
  66. #define    CARRY_FLAG    0x1
  67.  
  68. /* In pktdrvr.asm: */
  69. int far test_for_pd (int intno);
  70. int far access_type (int intno,int if_class,int if_type,int if_number,
  71.     char far *type,unsigned typelen,int interrupt (*receiver) (void) );
  72. int far driver_type (int intno);
  73. int far release_type (int intno,int handle);
  74. int far get_address (int intno,int handle,char far *buf,int len);
  75. int far get_mtu (int intno);
  76. int far send_pkt (int intno,char far *buffer,unsigned length);
  77. int far set_mode (int intno,int handle,int mode);
  78.  
  79. #endif    /* CL_ETHERNET */
  80.