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_ADD_REQUEST_LINE 3SIP "Jan 25, 2007"
8 sip_add_request_line, sip_add_response_line \- add a request/response line to a
13 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ]
16 \fBint\fR \fBsip_add_request_line\fR(\fBsip_msg_t\fR \fIsip_request\fR,
17 \fBsip_method_t\fR \fImethod\fR, \fBchar *\fR\fIrequest_uri\fR);
22 \fBint\fR \fIsip_add_response_line\fR(\fBsip_msg_t\fR \fIsip_response\fR,
23 \fBint\fR \fIresponse_code\fR, \fBchar *\fR\fIresponse_phase\fR);
29 The \fBsip_add_request_line()\fR function adds a request line to the \fBSIP\fR
30 message \fIsip_request\fR. The request line is created using the \fBSIP\fR
31 method specified in \fImethod\fR and the \fBURI\fR in \fIrequest_uri\fR. The
32 \fBSIP\fR method can be one of the following:
79 The resulting request line has the \fBSIP\fR-Version of "2.0".
82 The \fBsip_add_response_line()\fR function adds a response line to the
83 \fBSIP\fR message \fIsip_response\fR. The response line is created using the
84 response code \fIresponse_code\fR and the phrase in \fIresponse_phrase\fR. If
85 the \fIresponse_code\fR is one that is listed in RFC 3261,
86 \fBsip_get_resp_desc()\fR can be used to get the response phase for the
87 \fIresponse_code\fR. The resulting response line has the \fBSIP\fR-Version of
92 The \fBsip_add_response_line()\fR and \fBsip_add_request_line()\fR functions
93 return \fB0\fR on success and the appropriate error value in case of failure.
96 The value of \fBerrno\fR is not changed by these calls in the event of an
101 On failure, the \fBsip_add_response_line()\fR and \fBsip_add_request_line()\fR
102 functions could return one of the following errors:
109 If mandatory input is not provided or if the input is invalid.
118 If the input \fBSIP\fR message cannot be modified.
127 If memory allocation fails when creating the request/response line or when
128 creating headers in the \fBACK\fR request.
134 See \fBattributes\fR(5) for descriptions of the following attributes:
142 ATTRIBUTE TYPE ATTRIBUTE VALUE
144 Interface Stability Committed