52#include <sofia-sip/url.h>
60 __attribute__((__malloc__));
76 __attribute__((__malloc__));
79 __attribute__((__malloc__));
82 __attribute__((__malloc__));
86 __attribute__((__malloc__));
89 __attribute__((__malloc__));
92 __attribute__((__malloc__));
159 __attribute__((__malloc__));
163 char const *fmt, ...)
164 __attribute__ ((__malloc__, __format__ (printf, 3, 4)));
170 __attribute__((__malloc__));
182 __attribute__((__malloc__));
185 __attribute__((__malloc__));
190#define MSG_CHUNK_BUFFER(pl) \
191 ((char *)pl->pl_common->h_data + (pl)->pl_common->h_len)
193#define MSG_CHUNK_AVAIL(pl) \
194 ((pl)->pl_len + ((pl)->pl_data - (char *)pl->pl_common->h_data) - \
195 (pl)->pl_common->h_len)
197#define MSG_CHUNK_NEXT(pl) \
215 if (h && h->
h_class->hc_params) {
216 return (msg_param_t **)((
char *)h + h->
h_class->hc_params);
221#define msg_fragment_clear(h) ((h)->h_data = NULL, (h)->h_len = 0)
222#define msg_header_params(h) \
223 (((h) && ((msg_common_t *)h)->h_class->hc_params) ? \
224 (msg_param_t **)((char *)(h) + ((msg_common_t *)h)->h_class->hc_params) : NULL)
247 msg_param_t
const items[]);
252 msg_param_t
const items[]);
260 void const *d, isize_t dlen);
262SOFIAPUBFUN msg_param_t msg_params_find(msg_param_t
const pp[],
264SOFIAPUBFUN msg_param_t *msg_params_find_slot(msg_param_t [],
270 char const *
const b[]);
272 char const * **inout_paramlist,
274SOFIAPUBFUN int msg_params_remove(
char const **paramlist,
280 __attribute__((__malloc__));
288#define MSG_ALIGN(p, t) (((uintptr_t)(p) + (t) - 1) & (0 - (uintptr_t)(t)))
289#define MSG_STRUCT_SIZE_ALIGN(rv) ((rv) = MSG_ALIGN(rv, sizeof(void *)))
290#define MSG_STRUCT_ALIGN(p) ((p) = (void*)MSG_ALIGN(p, sizeof(void *)))
294#define MSG_N_PARAMS msg_n_params
298#define MSG_HEADER_INIT(h, msg_class, size) \
299 ((void)memset((h), 0, (size)), \
300 (void)(((msg_common_t *)(h))->h_class = (msg_class)), \
304#define MSG_HEADER_NONE ((msg_header_t *)(intptr_t)-1)
Prototypes for common headers.
struct msg_hclass_s const msg_hclass_t
Header class.
Definition msg_types.h:48
MSG_HDR_T msg_header_t
Any protocol-specific header object.
Definition msg_types.h:87
MSG_PUB_T msg_pub_t
Public protocol-specific message structure for accessing the message.
Definition msg_types.h:81
Common part of the header objects (or message fragments).
Definition msg_types.h:111
void const * h_data
Fragment data.
Definition msg_types.h:115
usize_t h_len
Fragment length (including CRLF)
Definition msg_types.h:116
msg_hclass_t * h_class
Header class.
Definition msg_types.h:114
List header.
Definition msg_types.h:161
Factory object for protocol messages.
Definition msg_mclass.h:97
Message payload.
Definition msg_types.h:214
Message object.
Definition msg_internal.h:59
Separator.
Definition msg_types.h:207