2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SIP_GET_HEADER 3SIP "Feb 09, 2007"
8 sip_get_header \- get a SIP header from a message
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ]
15 \fBconst struct sip_header *\fR\fIsip_get_header\fR(\fBsip_msg_t\fR \fIsip_msg\fR,
16 \fBchar *\fR\fIheader_name\fR, \fBsip_header_t\fR \fIold_header\fR, \fBint *\fR\fIerror\fR);
22 The \fBsip_get_header()\fR function returns the header specified by
23 \fIheader_name\fR (long or compact form) from the \fBSIP\fR message
24 \fIsip_msg\fR. If \fIheader_name\fR is \fBNULL\fR, the first header in the
25 \fBSIP\fR message is returned. The \fBold_header\fR, if non-null, specifies the
26 starting position in \fIsip_msg\fR from which the search is started. Otherwise,
27 the search begins at the start of the \fBSIP\fR message. For example, to get
28 the first \fBVIA\fR header from the \fBSIP\fR message \fIsip_msg\fR:
32 via_hdr = sip_get_header(sip_msg, "VIA", NULL, &error);
38 To get the next \fBVIA\fR header from \fIsip_msg\fR:
42 via_hdr = sip_get_header(sip_msg, "VIA", via_hdr, &error);
48 The \fBsip_get_header()\fR function ignores any header that is marked as
53 On success, the \fBsip_get_header()\fR function returns the queried header. On
54 failure, it returns \fBNULL\fR.
57 The value of \fBerrno\fR is not changed by these calls in the event of an
62 The following value may be returned:
69 The \fIheader_name\fR specified in the \fBSIP\fR message is not present or has
70 been deleted; or, the \fIheader_name\fR is not specified and there are no
71 "un-deleted" headers in the \fBSIP\fR message.
77 See \fBattributes\fR(5) for descriptions of the following attributes:
85 ATTRIBUTE TYPE ATTRIBUTE VALUE
87 Interface Stability Committed