Session Initiation Protocol Library Functions
sip_get_trans_method(3SIP)
NAME
sip_get_trans_method, sip_get_trans_state,
sip_get_trans_orig_msg, sip_get_trans_conn_obj,
sip_get_trans_resp_msg, sip_get_trans_branchid - get tran-
saction attributesSYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ]
#include
sip_method_t sip_get_trans_method(sip_transaction_t sip_trans,
int *error);int sip_get_trans_state(sip_transaction_t trans, int *error);
const struct sip_message *sip_get_trans_orig_msg
(sip_transaction_t sip_trans, int *error);
const struct sip_message *sip_get_trans_resp_msg
(sip_transaction_t sip_trans, int *error);
const struct sip_conn_object *sip_get_trans_conn_obj
(sip_transaction_t sip_trans, int *error);
char *sip_get_trans_branchid(sip_transaction_t trans, int *error);
DESCRIPTION
The sip_get_trans_method() function returns the method the
SIP message that created the transaction sip_trans.
The sip_get_trans_state() function returns the state of the
transaction sip_trans.
A newly created transaction is in the state:SIP_NEW_TRANSACTION
A client transaction could be in one of the following states:SIP_CLNT_CALLING
SIP_CLNT_INV_PROCEEDING
SIP_CLNT_INV_TERMINATED
SIP_CLNT_INV_COMPLETED
SunOS 5.11 Last change: 10 Feb 2007 1
Session Initiation Protocol Library Functionssip_get_trans_method(3SIP)
SIP_CLNT_TRYING
SIP_CLNT_NONINV_PROCEEDING
SIP_CLNT_NONINV_TERMINATED
SIP_CLNT_NONINV_COMPLETED
A server transaction could be in one of the following states:SIP_SRV_INV_PROCEEDING
SIP_SRV_INV_COMPLETED
SIP_SRV_CONFIRMED
SIP_SRV_INV_TERMINATED
SIP_SRV_TRYING
SIP_SRV_NONINV_PROCEEDING
SIP_SRV_NONINV_COMPLETED
SIP_SRV_NONINV_TERMINATED
The sip_get_trans_orig_msg() function returns the message
that created the transaction sip_trans. This could be a
request on the client or a response on the server.The sip_get_trans_resp_msg() function returns the last
response that was sent on the transaction sip_trans. Typi-
cally, this response is used by the transaction layer for retransmissions for unreliable transports or for responding to retransmitted requests. A response that terminates a transaction is not returned.The sip_get_trans_conn_obj() function returns the cached
connection object, if any, in the transactionsip_trans.
The sip_get_trans_branchid() function returns the branch ID
for the message that created the transactionsip_trans. The
caller is responsible for freeing the returned string.RETURN VALUES
The sip_get_trans_orig_msg(), sip_get_trans_resp_msg(),
sip_get_trans_conn_obj(), and sip_get_trans_branchid() func-
tions return the required value on success or NULL on failure.The sip_get_trans_state() and sip_get_trans_method() func-
tions return the required value on success and -1 on
failure.SunOS 5.11 Last change: 10 Feb 2007 2
Session Initiation Protocol Library Functionssip_get_trans_method(3SIP)
The value of errno is not changed by these calls in the event of an error.ERRORS
If the error is non-null, one of the following values is
set:EINVAL The input transaction sip_trans is NULL.
ENOMEM For sip_get_trans_branchid() there is an error
allocating memory for the branch ID string. On success, the value of the location pointed to by error is set to 0.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
SEE ALSO
libsip(3LIB)SunOS 5.11 Last change: 10 Feb 2007 3
Session Initiation Protocol Library Functionssip_get_trans_method(3SIP)
SunOS 5.11 Last change: 10 Feb 2007 4