home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / misc / tcpipsrc / slip.h < prev    next >
Text File  |  1990-11-09  |  2KB  |  54 lines

  1. #ifndef    _SLIP_H
  2. #define    _SLIP_H
  3.  
  4. #ifndef    _GLOBAL_H
  5. #include "global.h"
  6. #endif
  7.  
  8. #ifndef _PPP_H
  9. #include "ppp.h"
  10. #endif
  11.  
  12. #ifndef _SLCOMPRESS_H
  13. #include "slcompre.h"
  14. #endif
  15.  
  16. #define SLIP_MAX 5        /* Maximum number of slip channels */
  17.  
  18. /* SLIP definitions */
  19. #define    SLIP_ALLOC    100    /* Receiver allocation increment */
  20.  
  21. #define    FR_END        0300    /* Frame End */
  22. #define    FR_ESC        0333    /* Frame Escape */
  23. #define    T_FR_END    0334    /* Transposed frame end */
  24. #define    T_FR_ESC    0335    /* Transposed frame escape */
  25.  
  26. /* Slip protocol control structure */
  27. struct slip {
  28.     struct iface *iface;
  29.     char escaped;        /* Receiver State control flag */
  30. #define SLIP_FLAG    0x01        /* Last char was a frame escape */
  31. #define SLIP_VJCOMPR    0x02        /* TCP header compression enabled */
  32.     struct mbuf *rbp;    /* Head of mbuf chain being filled */
  33.     struct mbuf *rbp1;    /* Pointer to mbuf currently being written */
  34.     char *rcp;        /* Write pointer */
  35.     int16 rcnt;        /* Length of mbuf chain */
  36.     struct mbuf *tbp;    /* Transmit mbuf being sent */
  37.     int16 errors;        /* Receiver input errors */
  38.     int type;        /* Protocol of input */
  39.     int (*send)(int,struct mbuf *);    /* Routine to send mbufs */
  40.     int (*get)(int);    /* Routine to fetch input chars */
  41.     int (*get_rlsd)(int, int);    /* Routine to monitor RLSD signal */
  42.     struct slcompress *slcomp;    /* TCP header compression table */
  43.     struct pppctl *pppio;    /* Control structure for PPP interfaces */
  44. };
  45. extern struct slip Slip[];
  46. /* In slip.c: */
  47. void asy_rx __ARGS((int xdev,void *p1,void *p2));
  48. void asytxdone __ARGS((int dev));
  49. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  50. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  51.     int del,int tput,int rel));
  52. void doslstat __ARGS((struct iface *iface));
  53. #endif    /* _SLIP_H */
  54.