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