Current File : //usr/man/man3sip/sip_register_sent_by.3sip
'\" te
.\"  Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved
.TH sip_register_sent_by 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions"
.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
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)