1sip_get_trans_methSoeds(s3iSoInP)Initiation Protocol LibrarysFiupn_cgteito_ntsrans_method(3SIP)
2
3
4

NAME

6       sip_get_trans_method,    sip_get_trans_state,   sip_get_trans_orig_msg,
7       sip_get_trans_conn_obj, sip_get_trans_resp_msg,  sip_get_trans_branchid
8       - get transaction attributes
9

SYNOPSIS

11       cc [ flag ... ] file ... -lsip [ library ... ]
12       #include <sip.h>
13
14       sip_method_t sip_get_trans_method(sip_transaction_t sip_trans,
15            int *error);
16
17
18       int sip_get_trans_state(sip_transaction_t trans, int *error);
19
20
21       const struct sip_message *sip_get_trans_orig_msg
22            (sip_transaction_t sip_trans, int *error);
23
24
25       const struct sip_message *sip_get_trans_resp_msg
26            (sip_transaction_t sip_trans, int *error);
27
28
29       const struct sip_conn_object *sip_get_trans_conn_obj
30            (sip_transaction_t sip_trans, int *error);
31
32
33       char *sip_get_trans_branchid(sip_transaction_t trans, int *error);
34
35

DESCRIPTION

37       The  sip_get_trans_method() function returns the method the SIP message
38       that created the transaction sip_trans.
39
40
41       The sip_get_trans_state() function returns the state of the transaction
42       sip_trans.
43
44
45       A newly created transaction is in the state:
46         SIP_NEW_TRANSACTION
47
48
49       A client transaction could be in one of the following states:
50         SIP_CLNT_CALLING
51         SIP_CLNT_INV_PROCEEDING
52         SIP_CLNT_INV_TERMINATED
53         SIP_CLNT_INV_COMPLETED
54         SIP_CLNT_TRYING
55         SIP_CLNT_NONINV_PROCEEDING
56         SIP_CLNT_NONINV_TERMINATED
57         SIP_CLNT_NONINV_COMPLETED
58
59
60       A server transaction could be in one of the following states:
61         SIP_SRV_INV_PROCEEDING
62         SIP_SRV_INV_COMPLETED
63         SIP_SRV_CONFIRMED
64         SIP_SRV_INV_TERMINATED
65         SIP_SRV_TRYING
66         SIP_SRV_NONINV_PROCEEDING
67         SIP_SRV_NONINV_COMPLETED
68         SIP_SRV_NONINV_TERMINATED
69
70
71       The  sip_get_trans_orig_msg() function returns the message that created
72       the transaction sip_trans. This could be a request on the client  or  a
73       response on the server.
74
75
76       The  sip_get_trans_resp_msg()  function  returns the last response that
77       was sent on the transaction sip_trans. Typically, this response is used
78       by  the transaction layer for retransmissions for unreliable transports
79       or for responding to retransmitted requests. A response that terminates
80       a transaction is not returned.
81
82
83       The  sip_get_trans_conn_obj()  function  returns  the cached connection
84       object, if any, in the transactionsip_trans.
85
86
87       The sip_get_trans_branchid() function returns the  branch  ID  for  the
88       message  that created the transactionsip_trans. The caller is responsi‐
89       ble for freeing the returned string.
90

RETURN VALUES

92       The         sip_get_trans_orig_msg(),         sip_get_trans_resp_msg(),
93       sip_get_trans_conn_obj(), and sip_get_trans_branchid() functions return
94       the required value on success or NULL on failure.
95
96
97       The sip_get_trans_state() and sip_get_trans_method()  functions  return
98       the required value on success and  -1 on failure.
99
100
101       The  value  of  errno  is not changed by these calls in the event of an
102       error.
103

ERRORS

105       If the error is non-null, one of the following values is set:
106
107       EINVAL    The input transaction sip_trans is NULL.
108
109
110       ENOMEM    For sip_get_trans_branchid() there is  an   error  allocating
111                 memory for the branch ID string.
112
113
114
115       On success, the value of the location pointed to by error is set to 0.
116

ATTRIBUTES

118       See attributes(5) for descriptions of the following attributes:
119
120
121
122
123       ┌─────────────────────────────┬─────────────────────────────┐
124       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
125       ├─────────────────────────────┼─────────────────────────────┤
126       │Interface Stability          │Committed                    │
127       ├─────────────────────────────┼─────────────────────────────┤
128       │MT-Level                     │MT-Safe                      │
129       └─────────────────────────────┴─────────────────────────────┘
130

SEE ALSO

132       libsip(3LIB)
133
134
135
136SunOS 5.11                        10 Feb 2007       sip_get_trans_method(3SIP)
Impressum