summaryrefslogtreecommitdiff
path: root/usr/src/man/man3sip/sip_register_sent_by.3sip
blob: 157a58764ad598d0e6816338239a0590b6a653f7 (plain)
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
'\" 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_REGISTER_SENT_BY 3SIP "Jan 25, 2007"
.SH NAME
sip_register_sent_by, sip_unregister_sent_by, sip_unregister_all_sent_by \-
allows registering and un-registering sent-by values
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ]
#include <sip.h>

\fBint\fR \fIsip_register_sent_by\fR(\fBchar *\fR\fIval\fR);
.fi

.LP
.nf
\fBvoid\fR \fIsip_unregister_sent_by\fR(\fBchar *\fR\fIval\fR);
.fi

.LP
.nf
\fBvoid\fR \fIsip_unregister_all_sent_by\fR(\fBint *\fR\fIerror\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBsip_register_sent_by()\fR function can be used to register a list of
hostnames or IP addresses that the application may add to the \fBVIA\fR
headers. The \fIval\fR is a comma separated list of such sent-by values. If any
value is registered using \fBsip_register_sent_by()\fR, the \fBSIP\fR stack
validates incoming responses to check if the sent-by parameter in the topmost
\fBVIA\fR header is part of the registered list. If the check fails, the
response is dropped. If there are no sent-by values registered, there is no
check done on incoming responses.
.sp
.LP
The \fBsip_unregister_sent_by()\fR and \fBsip_unregister_all_sent_by()\fR
functions are used to un-register sent-by values. The \fIval\fR for
\fBsip_unregister_sent_by()\fR is a comma separated list of sent-by values that
need to be un-registered. \fBsip_unregister_all_sent_by()\fR un-registers all
the values that have been registered.
.SH RETURN VALUES
.sp
.LP
The \fBsip_register_sent_by()\fR function returns \fB0\fR on success and the
appropriate error value on failure.
.sp
.LP
The value of \fBerrno\fR is not changed by these calls in the event of an
error.
.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)