Parser table and message factory object.
More...
Go to the source code of this file.
|
msg_mclass_t * | msg_mclass_clone (msg_mclass_t const *old, int newsize, int empty) |
| Clone a message class. More...
|
|
int | msg_mclass_insert (msg_mclass_t *mc, msg_href_t const *hr) |
| Add a header reference to the message class. More...
|
|
int | msg_mclass_insert_header (msg_mclass_t *mc, msg_hclass_t *hc, unsigned short offset) |
| Add a new header to the message class. More...
|
|
int | msg_mclass_insert_with_mask (msg_mclass_t *mc, msg_hclass_t *hc, unsigned short offset, unsigned short mask) |
| Add a new header to the message class. More...
|
|
msg_href_t const * | msg_find_hclass (msg_mclass_t const *, char const *, isize_t *) |
| Search for a header class. More...
|
|
msg_mclass_t const * | msg_mclass (msg_t const *) |
| Retrieve message class. More...
|
|
Parser table and message factory object.
- Author
- Pekka Pessi Pekka.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com
- Date
- Created: Mon Aug 27 15:44:27 2001 ppessi
Enumerator |
---|
MC_HASH_SIZE |
Default size of hash table.
|
MC_SHORT_SIZE |
Size of short form table.
|
msg_href_t const * msg_find_hclass |
( |
msg_mclass_t const * |
mc, |
|
|
char const * |
s, |
|
|
isize_t * |
return_start_of_content |
|
) |
| |
Search for a header class.
The function msg_find_hclass() searches for a header class from a message class based on the contents of the header to be parsed. The buffer s should point to the first character in the header name.
- Parameters
-
[in] | mc | message class object |
[in] | s | header contents |
[out] | return_start_of_content | start of header content (may be NULL) |
- Returns
- The function msg_find_hclass() returns a pointer to a header reference structure. A pointer to a header reference for unknown headers is returned, if the header is not included in the message class.
- The return-value parameter return_start_of_content will contain the start of the header contents within s, or 0 upon an error parsing the header name and following colon.
- Upon a fatal error, a NULL pointer is returned.
Retrieve message class.
Get a pointer to the message class object (factory object for the message).
- Parameters
-
- Returns
- A pointer to the message class, or NULL if none.
Add a header reference to the message class.
- Parameters
-
[in,out] | mc | pointer to a message class object |
[in] | hr | header reference object |
- Returns
- Number of collisions in hash table, or -1 upon an error.
Add a new header to the message class.
Insert a header class hc to the message class object mc. If the given offset of the header in public messagestructure" is zero, the function extends the public message structure in order to store newly inserted header there.
- Parameters
-
[in,out] | mc | pointer to a message class object |
[in] | hc | pointer to a header class object |
[in] | offset | offset of the header in public message structure |
If the offset is 0, the msg_mclass_insert_header() increases size of the public message structure and places the header at the end of message.
- Returns
- Number of collisions in hash table, or -1 upon an error.
- Deprecated:
- Use msg_mclass_insert_with_mask() instead.
Add a new header to the message class.
Insert a header class hc to the message class mc. If the given offset of the header in public message structure is zero, extend the size of the public message structure in order to store headers at the end of structure.
- Parameters
-
[in,out] | mc | pointer to a message class |
[in] | hc | pointer to a header class |
[in] | offset | offset of the header in public message structure |
[in] | flags | classification flags for the header |
- Returns
- Number of collisions in hash table, or -1 upon an error.