56#ifndef MSG_TIME_T_DEFINED
57#define MSG_TIME_T_DEFINED
64#define MSG_TIME_MAX ((msg_time_t)ULONG_MAX)
69#define MSG_PUB_T MSG_OBJ_T
71#define MSG_PUB_T struct msg_pub_s
84#define MSG_HDR_T union msg_header_u
98typedef char const *msg_param_t;
105#define MSG_HEADER_N 16377
133#define msg_ident msg_common->h_class
228#define sh_next sh_header_next->shn_next
229#define sh_class sh_common->h_class
230#define sh_succ sh_common->h_succ
231#define sh_prev sh_common->h_prev
232#define sh_data sh_common->h_data
233#define sh_len sh_common->h_len
262typedef issize_t msg_print_f(
char buf[], isize_t bufsiz,
265 char *buf, isize_t bufsiz);
266typedef isize_t msg_xtra_f(
msg_header_t const *h, isize_t offset);
268typedef int msg_update_f(
msg_common_t *,
char const *name, isize_t namelen,
298#define HC_LEN_MAX SHRT_MAX
struct msg_hclass_s const msg_hclass_t
Header class.
Definition msg_types.h:48
unsigned long msg_time_t
Time in seconds since epoch (1900-Jan-01 00:00:00).
Definition msg_types.h:59
MSG_HDR_T msg_header_t
Any protocol-specific header object.
Definition msg_types.h:87
msg_header_kind_t
Define how to handle existing headers when a new header is added to a message.
Definition msg_types.h:250
@ msg_kind_prepend
New header is prepended.
Definition msg_types.h:256
@ msg_kind_list
A token list header, new header is combined with old one.
Definition msg_types.h:253
@ msg_kind_single
Only one header is allowed.
Definition msg_types.h:251
@ msg_kind_append
New header is appended.
Definition msg_types.h:252
@ msg_kind_apndlist
A complex list header.
Definition msg_types.h:255
MSG_PUB_T msg_pub_t
Public protocol-specific message structure for accessing the message.
Definition msg_types.h:81
Authentication-Info header.
Definition msg_types.h:184
msg_common_t ai_common[1]
Common fragment info.
Definition msg_types.h:185
msg_error_t * ai_next
Dummy link to next.
Definition msg_types.h:186
msg_param_t const * ai_params
List of ainfo.
Definition msg_types.h:187
Authentication header.
Definition msg_types.h:172
char const * au_scheme
Auth-scheme like Basic or Digest.
Definition msg_types.h:175
msg_param_t const * au_params
Comma-separated parameters.
Definition msg_types.h:176
msg_auth_t * au_next
Link to next header.
Definition msg_types.h:174
msg_common_t au_common[1]
Common fragment info.
Definition msg_types.h:173
Common part of the header objects (or message fragments).
Definition msg_types.h:111
msg_header_t ** h_prev
Pointer to preceeding fragment.
Definition msg_types.h:113
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_header_t * h_succ
Pointer to succeeding fragment.
Definition msg_types.h:112
msg_hclass_t * h_class
Header class.
Definition msg_types.h:114
Erroneus header.
Definition msg_types.h:199
char const * er_name
Name of bad header (if any).
Definition msg_types.h:202
msg_common_t er_common[1]
Common fragment info.
Definition msg_types.h:200
msg_error_t * er_next
Link to next header.
Definition msg_types.h:201
Generic header.
Definition msg_types.h:151
msg_common_t g_common[1]
Common fragment info.
Definition msg_types.h:152
char const * g_string
Header value.
Definition msg_types.h:154
msg_generic_t * g_next
Link to next header.
Definition msg_types.h:153
Factory object for a header.
Definition msg_types.h:279
msg_parse_f * hc_parse
Parse header.
Definition msg_types.h:282
msg_print_f * hc_print
Print header.
Definition msg_types.h:283
unsigned char hc_size
Size of header structure.
Definition msg_types.h:290
msg_xtra_f * hc_dxtra
Calculate extra size for dup.
Definition msg_types.h:284
unsigned hc_critical
True if header is critical.
Definition msg_types.h:294
int hc_hash
Header name hash or ID.
Definition msg_types.h:281
char const * hc_name
Full name.
Definition msg_types.h:287
msg_update_f * hc_update
Update parameter(s)
Definition msg_types.h:286
msg_dup_f * hc_dup_one
Duplicate one header.
Definition msg_types.h:285
unsigned char hc_params
Offset of parameter list.
Definition msg_types.h:291
short hc_len
Length of hc_name.
Definition msg_types.h:288
unsigned hc_kind
Kind of header (msg_header_kind_t): single, append, list, apndlist, prepend.
Definition msg_types.h:292
char hc_short[2]
Short name, if any.
Definition msg_types.h:289
Header reference.
Definition msg_mclass.h:63
List header.
Definition msg_types.h:161
msg_common_t k_common[1]
Common fragment info.
Definition msg_types.h:162
msg_list_t * k_next
Link to next header.
Definition msg_types.h:163
msg_param_t * k_items
List of items.
Definition msg_types.h:164
Factory object for protocol messages.
Definition msg_mclass.h:97
Numeric header.
Definition msg_types.h:140
msg_numeric_t * x_next
Link to next header.
Definition msg_types.h:142
msg_common_t x_common[1]
Common fragment info.
Definition msg_types.h:141
unsigned long x_value
Numeric header value.
Definition msg_types.h:143
Message payload.
Definition msg_types.h:214
msg_payload_t * pl_next
Next payload chunk.
Definition msg_types.h:216
usize_t pl_len
Length of message payload.
Definition msg_types.h:218
char * pl_data
Data - may contain NUL.
Definition msg_types.h:217
msg_common_t pl_common[1]
Common fragment info.
Definition msg_types.h:215
Message object, common view.
Definition msg_types.h:121
msg_common_t msg_common[1]
Recursive.
Definition msg_types.h:122
Message object.
Definition msg_internal.h:59
Separator.
Definition msg_types.h:207
msg_error_t * sep_next
Dummy link to next header.
Definition msg_types.h:209
msg_common_t sep_common[1]
Common fragment info.
Definition msg_types.h:208
char sep_data[4]
NUL-terminated separator.
Definition msg_types.h:210
Unknown header.
Definition msg_types.h:191
msg_common_t un_common[1]
Common fragment info.
Definition msg_types.h:192
msg_unknown_t * un_next
Link to next unknown header.
Definition msg_types.h:193
char const * un_name
Header name.
Definition msg_types.h:194
char const * un_value
Header field value.
Definition msg_types.h:195