'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH sip_add_param 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" .SH NAME sip_add_param \- add a parameter to the SIP header .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] #include \fBsip_header_t\fR \fIsip_add_param\fR(\fBsip_header_t\fR \fIsip_header\fR, \fBchar *\fR\fIparam\fR, \fBint *\fR\fIerror\fR); .fi .SH DESCRIPTION .sp .LP The \fBsip_add_param()\fR function adds the parameter provided in \fIparam\fR to the \fBSIP\fR header \fIsip_header\fR. The function returns the header with the parameter added. A new header is created as a result of adding the parameter and the old header is marked deleted. Applications with multiple threads working on the same \fBSIP\fR header need to take note of this. If error is non-null, it (the location pointer by the variable) is set to \fB0\fR on success and the appropriate error value on error. .SH RETURN VALUES .sp .LP The \fBsip_add_param()\fR function returns the new header on success and null on failure. Further, if error is non-null, then on success the value in the location pointed by error is \fB0\fR and the appropriate error value on failure. .SH ERRORS .sp .LP On failure, functions that return an error value may return one of the following: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt Mandatory parameters are not provided, i.e. null. .sp For \fBsip_add_param()\fR, the header to be modified is marked deleted. .RE .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 10n .rt The message cannot be modified. .RE .sp .ne 2 .mk .na \fB\fBENOMEM\fR\fR .ad .RS 10n .rt There is an error allocating memory for creating headers/parameters. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBlibsip\fR(3LIB)