Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
NAME
sipgetcontactdisplayname, sipgetfromdisplayname,
sipgettodisplayname, sipgetfromtag, sipgettotag,
sipgetcallid, sipgetcallseqnum, sipgetcallseqmethod,
sipgetviasentbyhost, sipgetviasentbyport,
sipgetviasentprotocolversion,
sipgetviasentprotocolname, sipgetviasenttransport,
sipgetmaxforward, sipgetcontentlength,
sipgetcontenttype, sipgetcontentsubtype,
sipgetcontent, sipgetaccepttype,
sipgetacceptsubtype, sipgetacceptenc,
sipgetacceptlang, sipgetalertinfouri,
sipgetallowmethod, sipgetminexpires,
sipgetmimeversion, sipgetorg, sipgetpriority,
sipgetreplytodisplayname, sipgetreplytouristr,
sipgetdatetime, sipgetdateday, sipgetdatemonth,
sipgetdatewkday, sipgetdateyear,
sipgetdatetimezone, sipgetcontentdisp,
sipgetcontentenc, sipgeterrorinfouri,
sipgetexpires, sipgetrequire, sipgetsubject,
sipgetsupported, sipgettstampdelay,
sipgetunsupported, sipgetserver, sipgetuseragent,
sipgetwarningcode, sipgetwarningagent,
sipgetwarningtext, sipgetcallinfouri,
sipgetinreplyto, sipgetretryaftertime,
sipgetretryaftercmts, sipgetrackrespnum,
sipgetrackcseqnum, sipgetrackmethod,
sipgetrseqrespnum, sipgetprivvalue,
sipgetpassertediddisplayname,
sipgetpassertediduristr,
sipgetppreferrediddisplayname,
sipgetppreferrediduristr, sipgetauthorscheme,
sipgetauthorparam, sipgetautheninfo,
sipgetproxyauthenscheme, sipgetproxyauthenparam,
sipgetproxyauthorscheme, sipgetproxyauthorparam,
sipgetproxyrequire, sipgetwwwauthenscheme,
sipgetwwwauthenparam, sipgetallowevents,
sipgetevent, sipgetsubstate, sipgetcontentlang,
sipgettstampvalue, sipgetrouteuristr,
sipgetroutedisplayname, sipgetcontacturistr,
sipgetfromuristr, sipgettouristr - obtain header
specific attributes
SYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ]
#include
const sipstrt *sipgetcontactdisplayname(sipheadervaluet value,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 1
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetfromdisplayname(sipmsgt sipmsg,
int *error);
const sipstrt *sipgettodisplayname(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontacturistr(sipheadervaluet value,
int *error);
const sipstrt *sipgetfromuristr(sipmsgt sipmsg,
int *error);
const sipstrt *sipgettouristr(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetfromtag(sipmsgt sipmsg,
int *error);
const sipstrt *sipgettotag(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcallid(sipmsgt sipmsg,
int *error);
int sipgetcallseqnum(sipmsgt sipmsg,
int *error);
sipmethodt sipgetcallseqmethod(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetviasentbyhost(sipheadervaluet value,
int *error);
int sipgetviasentbyport (sipheadervaluet value,
int *error);
const sipstrt *sipgetviasentprotocolversion
(sipheadervaluet value, int *error);
SunOS 5.11 Last change: 10 Feb 2007 2
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetviasenttransport(sipheadervaluet value,
int *error);
int sipgetmaxforward(sipmsgt sipmsg,
int *error);
int sipgetcontentlength(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontenttype(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontentsubtype(sipmsgt sipmsg,
int *error);
char *sipgetcontent(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetaccepttype(sipheadervaluet value,
int *error);
const sipstrt *sipgetacceptsubtype(sipheadervaluet value,
int *error);
const sipstrt *sipgetacceptenc(sipheadervaluet value,
int *error);
const sipstrt *sipgetacceptlang(sipheadervaluet value,
int *error);
const sipstrt *sipgetalertinfouri(sipheadervaluet value,
int *error);
sipmethodt sipgetallowmethod(sipheadervaluet value,
int *error);
int sipgetminexpire(sipmsgt sipmsg,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 3
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetmimeversion(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetorg(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetpriority(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetreplytodisplayname(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetreplytouristr(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetdatetime(sipmsgt sipmsg,
int *error);
int sipgetdateday(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetdatemonth(sipmsgt sipmsg,
int *error);
int sipgetdateyear(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetdatewkday(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetdatetimezone(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontentdisp(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontentenc(sipheadervaluet value,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 4
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgeterrorinfouri(sipheadervaluet value,
int *error);
int sipgetexpires(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetrequire(sipheadervaluet value,
int *error);
const sipstrt *sipgetsubject(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetsupported(sipheadervaluet value,
int *error);
const sipstrt *sipgettstampdelay(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetunsupported(sipheadervaluet value,
int *error);
const sipstrt *sipgetserver(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetuseragent(sipmsgt sipmsg,
int *error);
int sipgetwarningcode(sipheadervaluet value,
int *error);
const sipstrt *sipgetwarningagent(sipheadervaluet value,
int *error);
const sipstrt *sipgetwarningtext(sipheadervaluet value,
int *error);
const sipstrt *sipgetcallinfouri(sipheadervaluet value,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 5
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetinreplyto(sipheadervaluet value,
int *error);
int sipgetretryaftertime(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetretryaftercmts(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetpassertediddisplayname
(sipheadervaluet value, int *error);
const sipstrt *sipgetpassertediduristr
(sipheadervaluet value, int *error);
int sipgetrackrespnum(sipmsgt sipmsg,
int *error);
int sipgetrackcseqnum(sipmsgt sipmsg, int *error);
sipmethodt sipgetrackmethod(sipmsgt sipmsg, int *error);
int sipgetrseqrespnum(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetprivvalue(sipheadervaluet value,
int *error);
const sipstrt *sipgetauthorscheme(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetauthorparam(sipmsgt sipmsg,
char *name, int *error);
const sipstrt *sipgetautheninfo(sipheadervaluet value,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 6
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetproxyauthenscheme(sipmsgt msg,
int *error);
const sipstrt *sipgetproxyauthenparam(sipmsgt sipmsg,
char *name, int *error);
const sipstrt *sipgetproxyauthorscheme(sipmsgt msg,
int *error);
const sipstrt *sipgetproxyauthorparam(sipmsgt sipmsg,
char *name, int *error);
const sipstrt *sipgetproxyrequire(sipheadervaluet value,
int *error);
const sipstrt *sipgetwwwauthenscheme(sipmsgt msg,
int *error);
const sipstrt *sipgetwwwauthenparam(sipmsgt sipmsg,
char *name, int *error);
const sipstrt *sipgetallowevents(sipheadervaluet value,
int *error);
const sipstrt *sipgetevent(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetsubstate(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetcontentlang(sipheadervaluet value,
int *error);
const sipstrt *sipgettstampvalue(sipmsgt sipmsg,
int *error);
const sipstrt *sipgetrouteuristr(sipheadervaluet value,
int *error);
SunOS 5.11 Last change: 10 Feb 2007 7
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
const sipstrt *sipgetroutedisplayname(sipheadervaluet value,
int *error);
DESCRIPTION
For functions that return a pointer of type sipstrt,
sipstrt is supplied by:
typedef struct sipstr {
char *sipstrptr;
int sipstrlen;
}sipstrt;
The sipstrptr parameter points to the start of the
returned value and sipstrlen supplies the length of the
returned value.
For example, given the following request line in a SIP mes-
sage sipmsg that is input to sipgetrequesturistr():
FROM : ;tag=1928301774
the return is a pointer to sipstrt with the sipstrptr
member pointing to "A" of Alice and sipstrlen being set to
5, the length of Alice.
Access functions for headers that can have multiple values
take the value as the input, while those that can have only
one value take the SIP message sipmsg as the input.
The sipgetcontactdisplayname(),
sipgetfromdisplayname(), and sipgettodisplayname()
functions will return the display name, if present, from the
CONTACT header value, FROM and TO header respectively.
The sipgetcontacturistr(), sipgetfromuristr(), and
sipgettouristr() functions will return the URI string
from the CONTACT value, FROM and TO header respectively.
The sipgetfromtag() and sipgettotag() functions will
return the TAG parameter value, if present, from the FROM
and TO header, respectively, in the provided SIP message
SunOS 5.11 Last change: 10 Feb 2007 8
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
sipmsg.
The sipgetcallid() function will return the value from the
CAL-ID header in the provided SIP message sipmsg.
The sipgetcallseqnum() function will return the call
sequence number from the CSEQ header in the provided SIP
message sipmsg.
The sipgetcallseqmethod() function will return the method
from the CSEQ header in the provided SIP message sipmsg.
The method can be one of the following:
INVITE
ACK
OPTIONS
BYE
CANCEL
REGISTER
REFER
INFO
SUBSCRIBE
NOTIFY
PRACK
UNKNOWN
The sipgetviasentbyhost(), sipgetviasentbyport(),
sipgetviasentprotocolversion(),
sipgetviasentprotocolname(), and
sipgetviasenttransport() functions will return the
sent-by host, port (if present), protocol version, protocol
name and transport information from the provided VIA header
value. Example, if the VIA value is given by SIP/2.0/UDP
bobspc.biloxi.com:5060, then the sent-by host is
"bobspc.biloxi.com", protocol name is "SIP", protocol ver-
sion is "2.0", port is 5060 and transport is UDP.
The sipgetmaxforward() function will return the value of
the MAX-FORWARDS header in the provided SIP message sipmsg.
INVITE
ACK
OPTIONS
BYE
CANCEL
REGISTER
REFER
INFO
SunOS 5.11 Last change: 10 Feb 2007 9
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
SUBSCRIBE
NOTIFY
PRACK
UNKNOWN
The sipgetcontentlength() function will return the value
of the CONTENT-LENGTH header in the provided SIP message
sipmsg. The method can return one of the following:
The sipgetcontenttype() and sipgetcontentsubtype()
functions will return the value of the Type and Sub-Type
field, respectively, from the CONTENT-TYPE header in the
provided SIP message sipmsg.
The sipgetcontent() function will return the message body
from the provided SIP message sipmsg. The returned string
is a copy of the message body and the caller is responsible
for freeing the string after use.
The sipgetaccepttype() and sipgetacceptsubtype()
functions will return the value of the Type and Sub-Type
field, respectively, from the provided ACEPT header value.
The sipgetacceptenc() function will return the content-
coding from the provided ACEPT-ENCODING header value.
The sipgetacceptlang() function will return the language
from the provided ACEPT-LANGUAGE header value.
The sipgetalertinfouri() function will return the URI
string from the provided ALERT-INFO header value.
The sipgetallowmethod() function will return the SIP
method from the provided ALOW header value. The method can
return one of the following:
INVITE
ACK
OPTIONS
BYE
CANCEL
REGISTER
REFER
INFO
SunOS 5.11 Last change: 10 Feb 2007 10
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
SUBSCRIBE
NOTIFY
PRACK
UNKNOWN
The sipgetminexpire() function will return the time in
seconds from the MIN-EXPIRES header in the provided SIP mes-
sage sipmsg.
The sipgetmimeversion() function will return the MIME
version string from the MIME-VERSION header in the provided
SIP message sipmsg.
The sipgetorg() function will return the organization
string value from the ORGANIZATION header in the provided
SIP message sipmsg.
The sipgetpriority() function will return the priority
string value from the PRIORITY header in the provided SIP
message sipmsg.
The sipgetreplytodisplayname() and
sipgetreplytouristr() functions will return the display
name (if present) and the URI string, respectively, from the
REPLY-TO header in the provided SIP message sipmsg.
The sipgetdatetime(), sipgetdateday(),
sipgetdatemonth(), sipgetdatewkday(),
sipgetdateyear() and sipgetdatetimezone() functions
will return the time, day, month, week day, year and
timezone value from the DATE header in the provided SIP mes-
sage sipmsg. Example, if the DATE header has the following
value:
Sat, 13 Nov 2010 23:29:00 GMT
the time is "23:29:00 ", week day is "Sat", day is "13",
month is "Nov", year is "2010", timezone is "GMT".
The sipgetcontentdisp() function will return the
content-disposition type from the CONTENT-DISPOSITION header
in the provided SIP message sipmsg.
SunOS 5.11 Last change: 10 Feb 2007 11
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
The sipgetcontentenc() function will return the content-
coding value from the CONTENT-ENCODING header value.
The sipgeterrorinfouri() function will return the URI
string from the provided EROR-INFO header value.
The sipgetexpires() function will return the time in
seconds from the EXPIRES header in the provided SIP message
sipmsg.
The sipgetrequire() function will return the option-tag
value from the provided REQUIRE header value.
The sipgetsubject() function will return the value of the
SUBJECT header in the provided SIP message sipmsg.
The sipgetsupported() function will return the extension
value from the provided SUPORTED header value.
The sipgettstampdelay() function will return the value
from the TIMESTAMP header in the provided SIP message
sipmsg.
The sipgetunsupported() function will return the extension
value from the provided UNSUPORTED header value.
The sipgetserver() function will return the value from the
SERVER header in the provided SIP message sipmsg.
The sipgetuseragent() function will return the value from
the USER-AGENT header in the provided SIP message sipmsg.
The sipgetwarningcode(), sipgetwarningagent(), and
sipgetwarningtext() functions will return the value of
the warn-code, warn-agent and warn-text, respectively, in
the provided WARNING header value.
The sipgetcallinfouri() function will return the URI
string in the provided CAL-INFO header value.
SunOS 5.11 Last change: 10 Feb 2007 12
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
The sipgetinreplyto() function will return the Call-Id
value in the provided IN-REPLY-TO header value.
The sipgetretryaftertime(), and
sipgetretryaftercmts() functions return the time and
comments (if any), respectively, from the RETRY-AFTER header
in the provided SIP message sipmsg.
The sipgetpassertediddisplayname() and
sipgetpassertediduristr() functions will return the
display name (if any) and the URI string, respectively, in
the provided P-ASERTED-IDENTITY header value.
The sipgetppreferrediddisplayname() and
sipgetppreferrediduristr() functions will return the
display name (if any) and the URI string, respectively, in
the provided P-PREFERED-IDENTITY header value.
The sipgetrackrespnum(), sipgetrackcseqnum(), and
sipgetrackmethod() functions will return the response-
number, the CSEQ number and the SIP method from the RACK
header in the provided SIP message sipmsg. The method can
return one of the following:
INVITE
ACK
OPTIONS
BYE
CANCEL
REGISTER
REFER
INFO
SUBSCRIBE
NOTIFY
PRACK
UNKNOWN
The sipgetrseqrespnum() function will return the
response-number, the RSEQ header in the provided SIP message
sipmsg.
The sipgetprivvalue() function will return the priv-value
in the provided PRIVACY header value.
SunOS 5.11 Last change: 10 Feb 2007 13
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
The sipgetrouteuristr() and sipgetroutedisplayname()
functions will return the URI string, and display name (if
present) from the provided ROUTE or RECORD-ROUTE header
value.
The sipgetauthorscheme() function will return the scheme
from the AUTHORIZATION header in the provided SIP message
sipmsg.
The sipgetauthorparam() function will return the value of
the parameter specified in name from the AUTHORIZATION
header in the SIP message sipmsg.
The sipgetautheninfo() function will return the authenti-
cation information from the provided AUTHORIZATION-INFO
header value.
The sipgetproxyauthenscheme() function will return the
scheme from the PROXY-AUTHENTICATE header in the SIP message
sipmsg.
The sipgetproxyauthenparam() function will return the
value of the parameter in name from the PROXY-AUTHENTICATE
header in the SIP message sipmsg.
The sipgetproxyauthorscheme() function will return the
value of the scheme from the PROXY-AUTHORIZATION header in
the SIP message sipmsg.
The sipgetproxyauthorparam() function will return the
value of the parameter specified in name from the PROXY-
AUTHORIZATION header in the SIP message sipmsg.
The sipgetproxyrequire() function will return the
option-tag from the provided PROXY-REQUIRE header value.
The sipgetwwwauthenscheme() function will return the
challenge from the W-AUTHENTICATE header in the SIP mes-
sage sipmsg.
SunOS 5.11 Last change: 10 Feb 2007 14
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
The sipgetwwwauthenparam() function will return the
value of the parameter specified in name from the W-
AUTHENTICATE header in the SIP message sipmsg.
The sipgetallowevents() function returns the value of the
allowed event from the provided ALOW-EVENTS header value.
The sipgetevent() function returns the event in the EVENT
header in the SIP message sipmsg.
The sipgetsubstate() function the subscription state from
the SUBSCRIPTION-STATE header in the provided SIP message
sipmsg.
The sipgetcontentlang() function will return the language
from the provided CONTENT-LANGUAGE value.
The sipgettstampvalue() function will return the times-
tamp value from the TIMESTAMP header in the SIP message
sipmsg.
RETURN VALUES
For functions that return a pointer to sipstrt, the return
value is the specified value on success or NUL in case of
error. For functions that return an integer, the return
value is the specified value on success and -1 on error.
The value of errno is not changed by these calls in the
event of an error.
ERORS
These functions take a pointer to an integer error as an
argument. If the error is non-null, one of the following
values is set:
EINVAL The input SIP message sipmsg or the header value
is null; or the specified header/header value is
deleted.
EPROTO The header value is not present or invalid. The
parser could not parse it correctly.
SunOS 5.11 Last change: 10 Feb 2007 15
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
ENOMEM There is an error allocating memory for the return
value.
On success, the value of the location pointed to by error is
set to 0.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
libsip(3LIB)
SunOS 5.11 Last change: 10 Feb 2007 16
Session Initiation Protocol Library Functions
sipgetcontactdisplayname(3SIP)
SunOS 5.11 Last change: 10 Feb 2007 17
|