1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
'\" 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_CREATE_OKACK 3SIP "Jan 25, 2007"
.SH NAME
sip_create_OKack \- create an ACK request for a final response
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ]
#include <sip.h>
\fBint\fR \fIsip_create_OKack\fR(\fBsip_msg_t\fR \fIresponse\fR,
\fBsip_msg_t\fR \fIack_msg\fR, \fBchar *\fR\fItransport\fR,
\fBchar *\fR\fIsent_by\fR, \fBint\fR \fIsent_by_port\fR,
\fBchar *\fR\fIvia_params\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBsip_create_OKack()\fR function constructs an \fBACK\fR request in
\fIack_msg\fR for the final \fB2\fR\fIXX\fR \fBSIP\fR response. The request
line is created using the \fBURI\fR in the \fBCONTACT\fR header from the
\fIresponse\fR. The SIP-Version in the request line is "2.0". The \fBVIA\fR
header for the \fBACK\fR request is created using \fItransport\fR,
\fIsent_by\fR, \fIsent_by_port\fR (if non-zero), and \fIvia_params\fR (if
non-null). The following headers are copied to \fIack_msg\fR from
\fIresponse\fR:
.br
.in +2
\fBFROM\fR
.in -2
.br
.in +2
\fBTO\fR
.in -2
.br
.in +2
\fBCALL-ID\fR
.in -2
.br
.in +2
\fBMAX_FORWARDS\fR
.in -2
.sp
.LP
The \fBCSEQ\fR header is created using the method as \fBACK\fR and the sequence
number from the \fBCSEQ\fR header in \fIresponse\fR.
.SH RETURN VALUES
.sp
.LP
The \fBsip_create_OKack()\fR function returns \fB0\fR on success and the
appropriate error value in case of failure.
.sp
.LP
The value of \fBerrno\fR is not changed by these calls in the event of an
error.
.SH ERRORS
.sp
.LP
On failure, the \fBsip_create_OKack()\fR function could return one of the
following errors:
.sp
.ne 2
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 11n
If mandatory input is not provided or if the input is invalid.
.sp
The \fBsip_create_OKack()\fR function can return this error if it does not find
a \fBCONTACT\fR header or if it is unable to obtain the \fBURI\fR from the
\fBCONTACT\fR header for the request line.
.RE
.sp
.ne 2
.na
\fB\fBENOTSUP\fR\fR
.ad
.RS 11n
If the input \fBSIP\fR message cannot be modified.
.RE
.sp
.ne 2
.na
\fB\fBENOMEM\fR\fR
.ad
.RS 11n
If memory allocation fails when creating the request/response line or when
creating headers in the \fBACK\fR request.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Committed
_
MT-Level MT-Safe
.TE
.SH SEE ALSO
.sp
.LP
\fBlibsip\fR(3LIB)
|