mkiss.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /****************************************************************************
  2. * Defines for the Multi-KISS driver.
  3. ****************************************************************************/
  4. #define AX25_MAXDEV 16 /* MAX number of AX25 channels;
  5. This can be overridden with
  6. insmod -oax25_maxdev=nnn */
  7. #define AX_MTU 236
  8. /* SLIP/KISS protocol characters. */
  9. #define END 0300 /* indicates end of frame */
  10. #define ESC 0333 /* indicates byte stuffing */
  11. #define ESC_END 0334 /* ESC ESC_END means END 'data' */
  12. #define ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */
  13. struct ax_disp {
  14. int magic;
  15. /* Various fields. */
  16. struct tty_struct *tty; /* ptr to TTY structure */
  17. struct net_device *dev; /* easy for intr handling */
  18. /* These are pointers to the malloc()ed frame buffers. */
  19. unsigned char *rbuff; /* receiver buffer */
  20. int rcount; /* received chars counter */
  21. unsigned char *xbuff; /* transmitter buffer */
  22. unsigned char *xhead; /* pointer to next byte to XMIT */
  23. int xleft; /* bytes left in XMIT queue */
  24. /* SLIP interface statistics. */
  25. unsigned long rx_packets; /* inbound frames counter */
  26. unsigned long tx_packets; /* outbound frames counter */
  27. unsigned long rx_bytes; /* inbound bytes counter */
  28. unsigned long tx_bytes; /* outbound bytes counter */
  29. unsigned long rx_errors; /* Parity, etc. errors */
  30. unsigned long tx_errors; /* Planned stuff */
  31. unsigned long rx_dropped; /* No memory for skb */
  32. unsigned long tx_dropped; /* When MTU change */
  33. unsigned long rx_over_errors; /* Frame bigger then SLIP buf. */
  34. /* Detailed SLIP statistics. */
  35. int mtu; /* Our mtu (to spot changes!) */
  36. int buffsize; /* Max buffers sizes */
  37. unsigned long flags; /* Flag values/ mode etc */
  38. /* long req'd: used by set_bit --RR */
  39. #define AXF_INUSE 0 /* Channel in use */
  40. #define AXF_ESCAPE 1 /* ESC received */
  41. #define AXF_ERROR 2 /* Parity, etc. error */
  42. #define AXF_KEEPTEST 3 /* Keepalive test flag */
  43. #define AXF_OUTWAIT 4 /* is outpacket was flag */
  44. int mode;
  45. int crcmode; /* MW: for FlexNet, SMACK etc. */
  46. #define CRC_MODE_NONE 0
  47. #define CRC_MODE_FLEX 1
  48. #define CRC_MODE_SMACK 2
  49. spinlock_t buflock; /* lock for rbuf and xbuf */
  50. };
  51. #define AX25_MAGIC 0x5316