4 * general purpose message format
6 * Copyright 1996 (c) D-J Koopman
11 * Revision 1.1 2000-03-26 00:03:30 djk
14 * Revision 1.7 1998/01/02 19:39:57 djk
15 * made various changes to cope with glibc
16 * fixed problem with extended status in etsi_router
18 * Revision 1.6 1997/03/25 18:12:45 djk
21 * Revision 1.5 1997/03/19 09:57:54 djk
22 * added a count to check for leaks
24 * Revision 1.4 1997/02/13 17:01:55 djk
27 * Revision 1.3 1997/01/20 22:29:23 djk
30 * Revision 1.2 1997/01/13 23:34:22 djk
31 * The first working test version of smsd
33 * Revision 1.1 1997/01/03 23:41:27 djk
34 * added a general message handling module (still developing)
35 * added dump (a general debugging routine)
42 static char _cmsg_h_rcsid[] = "$Id$";
47 reft head; /* the chain on which this message is going */
48 short size; /* the length of the data part of the message */
49 short sort; /* the type of message (ie text, rmip, etsi) (may have reply bit set) */
50 short state; /* the current state of this message */
51 short reply; /* the (standard) reply field */
52 time_t t; /* the time of arrival */
53 void (*callback)(); /* the callback address if any */
54 void *portp; /* the pointer to the port it came from */
55 unsigned char *inp; /* the current character pointer for input */
56 unsigned char data[1]; /* the actual data of the message */
59 #define CMSG_REPLY 0x8000
60 #define CMSG_SORTMASK (~CMSG_REPLY)
62 extern long cmsg_count;
64 cmsg_t *cmsg_new(int, int, void *);
65 void cmsg_send(reft *, cmsg_t *, void (*)());
66 void cmsg_priority_send(reft *, cmsg_t *, void (*)());
67 void cmsg_callback(cmsg_t *, int);
68 void cmsg_flush(reft *, int);
69 void cmsg_free(cmsg_t *);
70 cmsg_t *cmsg_next(reft *);
71 cmsg_t *cmsg_prev(reft *);