home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 024 / psi110g.zip / SLIP.H < prev    next >
C/C++ Source or Header  |  1994-04-17  |  2KB  |  60 lines

  1. /* Mods by G1EMM */
  2. #ifndef _SLIP_H
  3. #define _SLIP_H
  4.   
  5. #ifndef _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.   
  9. #ifndef _IFACE_H
  10. #include "iface.h"
  11. #endif
  12.   
  13. #ifndef _SLHC_H
  14. #include "slhc.h"
  15. #endif
  16.   
  17. #define SLIP_MAX 5      /* Maximum number of slip channels */
  18.   
  19. /* SLIP definitions */
  20. #define SLIP_ALLOC  100 /* Receiver allocation increment */
  21.   
  22. #define FR_END      0300    /* Frame End */
  23. #define FR_ESC      0333    /* Frame Escape */
  24. #define T_FR_END    0334    /* Transposed frame end */
  25. #define T_FR_ESC    0335    /* Transposed frame escape */
  26.   
  27. /* Slip protocol control structure */
  28. struct slip {
  29.     struct iface *iface;
  30.     char escaped;       /* Receiver State control flag */
  31. #define SLIP_FLAG   0x01        /* Last char was a frame escape */
  32. #define SLIP_VJCOMPR    0x02        /* TCP header compression enabled */
  33.     struct mbuf *rbp_head;  /* Head of mbuf chain being filled */
  34.     struct mbuf *rbp_tail;  /* Pointer to mbuf currently being written */
  35.     char *rcp;      /* Write pointer */
  36.     int16 rcnt;     /* Length of mbuf chain */
  37.     struct mbuf *tbp;   /* Transmit mbuf being sent */
  38.     int16 errors;       /* Receiver input errors */
  39.     int type;       /* Protocol of input */
  40.     int (*send) __ARGS((int,struct mbuf *));    /* send mbufs to device */
  41.     int (*get) __ARGS((int));   /* fetch input chars from device */
  42.     struct slcompress *slcomp;  /* TCP header compression table */
  43.     struct iface *kiss[16];     /* sub nodes  AX25 only */
  44.     int rx;                     /* set if a frame is being received */
  45.     int polled;                 /* Indicate a polled kiss link */
  46.     char rxcrc;                 /* CRC for receiving polled frames */
  47. };
  48.   
  49. /* In slip.c: */
  50. extern struct slip Slip[];
  51.   
  52. void asy_rx __ARGS((int xdev,void *p1,void *p2));
  53. void asytxdone __ARGS((int dev));
  54. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  55. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  56. int del,int tput,int rel));
  57. void slip_status __ARGS((struct iface *iface));
  58.   
  59. #endif  /* _SLIP_H */
  60.