The unknown headers are handled with msg_unknown_t structure.
The whole unknown header including its name is included in the header value string g_value.
- Note
- It is possible to speed up parsing process by creating a parser which does understand only a minimum number of headers. If such a parser is used, some well-known headers are not regocnized or parser, but they are treated as unknown and put unparsed into the list of unknown headers.
Copy a msg_unknown_t header structure.
The function msg_unknown_copy() copies a header structure header. If the header structure header contains a reference (header->h_next) to a list of headers, all the headers in that list are copied, too. The function uses given memory home to allocate all the memory areas used to copy the header structure header.
- Parameters
-
| home | memory home used to allocate new structure |
| header | pointer to the header structure to be duplicated |
When copying, only the header structure and parameter lists attached to it are duplicated. The new header structure retains all the references to the strings within the old header, including the encoding of the old header, if present.
- Example
msg_unknown_t * msg_unknown_copy(su_home_t *home, msg_unknown_t const *header))
Copy a msg_unknown_t header structure.
Definition msg_protos.h:222
- Returns
- The function msg_unknown_copy() returns a pointer to newly copied header structure, or NULL upon an error.
Duplicate (deep copy) msg_unknown_t.
The function msg_unknown_dup() duplicates a header structure header. If the header structure header contains a reference (header->x_next) to a list of headers, all the headers in the list are duplicated, too.
- Parameters
-
| home | memory home used to allocate new structure |
| header | header structure to be duplicated |
When duplicating, all parameter lists and non-constant strings attached to the header are copied, too. The function uses given memory home to allocate all the memory areas used to copy the header.
- Example
msg_unknown_t * msg_unknown_dup(su_home_t *home, msg_unknown_t const *header))
Duplicate (deep copy) msg_unknown_t.
Definition msg_protos.h:176
- Returns
- The function msg_unknown_dup() returns a pointer to the newly duplicated msg_unknown_t header structure, or NULL upon an error.