JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SIPAPI Developer's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  SIP Overview

2.  Oracle Solaris SIP Internals

3.  Multithreading and URI Support

4.  SIP API Functions

Stack Initialization Function

Message Allocation Functions

SIP Header Addition Functions

SIP Request and Response Creation Functions

Header and Message Copying Functions

Header and Value Deleting Functions

Header Lookup Functions

Value Retrieval and Response Description Functions

SIP ID Generating Functions

VIA Functions

SIP Message Sending Function

Processing Inbound Messages

Transaction Layer Functions

Dialog Layer Functions

URI Functions

SIP Header Value Retrieval Functions

Connection Object Functions

Miscellaneous Functions

A.  Examples of Use

B.  Programming with the SIP API

C.  Transaction Timers

Index

Header Lookup Functions

const struct sip_header *sip_get_header(sip_msg_t sip_msg, char *header_name, sip_header_t old_header, int *error);

The sip_get_header() function obtains the SIP message header that is specified by the value of the header_name parameter. If the value of the header_name parameter is NULL, the function returns the first header of the SIP message. If the value of the old_header parameter is not NULL, the function searches for a header that matches the value of the header_name parameter. This search begins from the header specified by the value of the old_header parameter. For example, to search for the first VIA header, use VIA as the value for the header_name parameter and NULL as the value for the old_header parameter. To get the next VIA header from the message, use the value of the sip_header parameter that the previous call to the sip_get_header() function returned as the value of the old_header parameter. This function ignores headers that are marked as deleted. A lookup for a deleted header returns a result of NULL unless the message has another header of the same name that is not marked as deleted. The value of the header_name parameter can be either the long or the compact name.

The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value. If the value of the sip_msg parameter is null, the function sets the value of the error parameter to EINVAL. If the function cannot find the header, it sets the value of the error parameter to ENOENT.