SIP API Developer's Guide

Writing Parsers For Custom Headers

An application can define custom headers or specialized versions of standard headers. Applications that define headers must register parsing functions with the library to support those headers. Use the following structures to write parsing functions:

sip_header_general_t

This structure provides the start and end of a header within a message. The parser sets the parsed header element to point to the sip_parsed_header_t structure that the parser allocates.

sip_parsed_header_t

The parser allocates and assigns this structure. The parser passes this structure back to the caller.

sip_value_t

The application defines the value of this structure depending on the header. The first element of the structure must be sip_value_t. The parser creates a linked list of values if multiple values exist. The parser sets the value of the value field in the parsed header to the first value. The application must provide any access function that value members require.