home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / tcpipsrc / h / AX_MBX < prev    next >
Text File  |  1992-02-15  |  2KB  |  41 lines

  1. /* Defines for the ax.25 mailbox facility */
  2.  
  3. #define NUMMBX          10              /* max number of mailbox sessions */
  4.  
  5. #define MBXLINE         128             /* max length of line */
  6. struct mbx {
  7.         int state ;                             /* mailbox state */
  8. #define MBX_CMD         1               /* in command mode */
  9. #define MBX_SUBJ        2               /* waiting for a subject line */
  10. #define MBX_DATA        3               /* collecting the message */
  11.         int type ;                              /* type of connection */
  12. #define MBX_AX25        1               /* ax25 connection */
  13. #define MBX_NETROM      2               /* net/rom transport connection */
  14.         char name[10] ;                 /* Name of remote station */
  15.         union {
  16.                 struct ax25_cb  *ax25_cb ;      /* ax.25 link control block */
  17.                 struct nr4cb *nr4_cb ;          /* net/rom link control block */
  18.         } cb ;
  19.         char *to ;                              /* To-address in form user or user@host */
  20.         char *tofrom ;                  /* Optional <from in to-address */
  21.         char *tomsgid ;                 /* Optional $msgid in to-address */
  22.         FILE *tfile ;                   /* Temporary file for message */
  23.         char line[MBXLINE+1] ;  /* Room for null at end */
  24.         char *lp ;                              /* line pointer */
  25.         int mbnum ;                             /* which mailbox session is this? */
  26.         int mblforw ;                   /* flag: MBL abbreviated forwarding mode */
  27.         char stype ;                    /* BBS send command type (B,P,T, etc.) */
  28. } ;
  29. #define         NULLMBX         (struct mbx *)0
  30.  
  31. extern struct mbx *mbox[NUMMBX] ;
  32. extern int ax25mbox ;
  33.  
  34. int  dombox(int, char **);
  35. void mbx_incom(struct ax25_cb *, int16);
  36. void mbx_rx(struct ax25_cb *, int16);
  37. void mbx_state(struct ax25_cb *, int, int);
  38. void mbx_nr4incom(struct nr4cb *);
  39. void mbx_nr4rx(struct nr4cb *, int16);
  40. void mbx_nr4state(struct nr4cb *, int, int);
  41.