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 98 typedef 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 262 typedef issize_t msg_print_f(
char buf[], isize_t bufsiz,
265 char *buf, isize_t bufsiz);
266 typedef isize_t msg_xtra_f(
msg_header_t const *h, isize_t offset);
268 typedef int msg_update_f(
msg_common_t *,
char const *name, isize_t namelen,
282 msg_parse_f *hc_parse;
283 msg_print_f *hc_print;
284 msg_xtra_f *hc_dxtra;
285 msg_dup_f *hc_dup_one;
286 msg_update_f *hc_update;
294 unsigned hc_critical:1;
298 #define HC_LEN_MAX SHRT_MAX Message payload.
Definition: msg_types.h:214
Common part of the header objects (or message fragments).
Definition: msg_types.h:111
struct msg_hclass_s const msg_hclass_t
Header class.
Definition: msg_types.h:48
List header.
Definition: msg_types.h:161
msg_unknown_t * un_next
Link to next unknown header.
Definition: msg_types.h:193
Header reference.
Definition: msg_mclass.h:62
New header is appended.
Definition: msg_types.h:252
unsigned long msg_time_t
Time in seconds since epoch (1900-Jan-01 00:00:00).
Definition: msg_types.h:59
short hc_len
Length of hc_name.
Definition: msg_types.h:288
A token list header, new header is combined with old one.
Definition: msg_types.h:253
MSG_PUB_T msg_pub_t
Public protocol-specific message structure for accessing the message.
Definition: msg_types.h:81
msg_payload_t * pl_next
Next payload chunk.
Definition: msg_types.h:216
msg_header_t ** h_prev
Pointer to preceeding fragment.
Definition: msg_types.h:113
msg_hclass_t * h_class
Header class.
Definition: msg_types.h:114
Only one header is allowed.
Definition: msg_types.h:251
Message object, common view.
Definition: msg_types.h:121
int hc_hash
Header name hash or ID.
Definition: msg_types.h:281
Erroneus header.
Definition: msg_types.h:199
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
void const * h_data
Fragment data.
Definition: msg_types.h:115
char const * hc_name
Full name.
Definition: msg_types.h:287
Factory object for a header.
Definition: msg_types.h:278
char const * un_value
Header field value.
Definition: msg_types.h:195
unsigned long x_value
Numeric header value.
Definition: msg_types.h:143
msg_error_t * ai_next
Dummy link to next.
Definition: msg_types.h:186
unsigned char hc_size
Size of header structure.
Definition: msg_types.h:290
Authentication header.
Definition: msg_types.h:172
msg_header_t * h_succ
Pointer to succeeding fragment.
Definition: msg_types.h:112
MSG_HDR_T msg_header_t
Any protocol-specific header object.
Definition: msg_types.h:87
Authentication-Info header.
Definition: msg_types.h:183
msg_numeric_t * x_next
Link to next header.
Definition: msg_types.h:142
usize_t msg_size(msg_t const *msg)
Total size of message.
Definition: msg_parser.c:682
Generic header.
Definition: msg_types.h:151
char const * g_string
Header value.
Definition: msg_types.h:154
usize_t h_len
Fragment length (including CRLF)
Definition: msg_types.h:116
Unknown header.
Definition: msg_types.h:191
msg_param_t * k_items
List of items.
Definition: msg_types.h:164
New header is prepended.
Definition: msg_types.h:256
msg_error_t * sep_next
Dummy link to next header.
Definition: msg_types.h:209
msg_param_t const * ai_params
List of ainfo.
Definition: msg_types.h:187
msg_list_t * k_next
Link to next header.
Definition: msg_types.h:163
msg_t * msg_next(msg_t *msg)
Get a next message of the stream.
Definition: msg_parser.c:564
A complex list header.
Definition: msg_types.h:255
msg_generic_t * g_next
Link to next header.
Definition: msg_types.h:153
msg_header_kind_t
Define how to handle existing headers when a new header is added to a message.
Definition: msg_types.h:250
Message object.
Definition: msg_internal.h:59
char * pl_data
Data - may contain NUL.
Definition: msg_types.h:217
Separator.
Definition: msg_types.h:207
msg_error_t * er_next
Link to next header.
Definition: msg_types.h:201
msg_auth_t * au_next
Link to next header.
Definition: msg_types.h:174
char const * er_name
Name of bad header (if any).
Definition: msg_types.h:202
char const * un_name
Header name.
Definition: msg_types.h:194
unsigned char hc_params
Offset of parameter list.
Definition: msg_types.h:291
Numeric header.
Definition: msg_types.h:140
Factory object for protocol messages.
Definition: msg_mclass.h:96
usize_t pl_len
Length of message payload.
Definition: msg_types.h:218