1sip_get_num_via(3SSIePs)sion Initiation Protocol Library Functsiiopn_sget_num_via(3SIP)
2
3
4

NAME

6       sip_get_num_via, sip_get_branchid - get VIA header specific attributes
7

SYNOPSIS

9       cc [ flag ... ] file ... -lsip [ library ... ]
10       #include <sip.h>
11
12       int sip_get_num_via(sip_msg_t sip_msg,
13            int *error);
14
15
16       char *sip_get_branchid(sip_msg_t sip_msg,
17            int *error);
18
19

DESCRIPTION

21       The sip_get_num_via() function returns the number of VIA headers in the
22       SIP message sip_msg.
23
24
25       The sip_get_branchid() function returns the branch ID  value  from  the
26       topmost  VIA header. The caller is responsible for freeing the returned
27       string.
28

RETURN VALUES

30       The sip_get_num_via() function returns the number  of  VIA  headers  on
31       success.
32
33
34       The  sip_get_branchid()  function  returns the branch ID on success and
35       NULL on failure.
36
37
38       The value of errno is not changed by these calls in  the  event  of  an
39       error.
40

ERRORS

42       If the error is non-null, one of the following values is set:
43
44       EINVAL    The sip_msg is NULL.
45
46
47       ENOENT    For  the sip_get_branchid function, there is no VIA header or
48                 the VIA header has no branch parameter.
49
50
51       EPROTO    For the sip_sip_get_trans.3sipget_branchid function, the  VIA
52                 value  is  invalid. The parser encountered an error or errors
53                 while parsing the VIA header.
54
55
56       ENOMEM    For the sip_get_branchid function, there is an error in allo‐
57                 cating memory for the branch ID.
58
59
60
61       On success, the value of the location pointed to by error is set to 0.
62

ATTRIBUTES

64       See attributes(5) for descriptions of the following attributes:
65
66
67
68
69       ┌─────────────────────────────┬─────────────────────────────┐
70       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │Interface Stability          │Committed                    │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │MT-Safe                      │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       libsip(3LIB)
79
80
81
82SunOS 5.11                        23 Jan 2007            sip_get_num_via(3SIP)
Impressum