1sip_copy_start_linSee(s3sSiIoPn)Initiation Protocol Library Fsuinpc_tcioopnys_start_line(3SIP)
2
3
4

NAME

6       sip_copy_start_line,      sip_copy_header,     sip_copy_header_by_name,
7       sip_copy_all_headers - copy headers from a SIP message
8

SYNOPSIS

10       cc [ flag ... ] file ... -lsip [ library ... ]
11       #include <sip.h>
12
13       int sip_copy_start_line(sip_msg_t from_msg, sip_msg_t to_msg);
14
15
16       int sip_copy_header(sip_msg_t sip_msg, sip_header_t sip_header,
17            char *param);
18
19
20       int sip_copy_header_by_name(sip_msg_t from_msg, sip_msg_t to_msg,
21            char *header_name, char *param);
22
23
24       int sip_copy_all_headers(sip_msg_t from_msg, sip_msg_t to_msg);
25
26

DESCRIPTION

28       The sip_copy_start_line() function copies the start line, a request  or
29       a response line, from from_msg to to_msg.
30
31
32       The  sip_copy_header()  function  copies  the  SIP  header specified by
33       sip_header to the SIP message sip_msg. A new SIP header is created from
34       sip_header and param, and is appended to sip_msg. The param can be non-
35       null.
36
37
38       The sip_copy_header_by_name() function copies the header  specified  by
39       header_name  (long  or  short  form)  from  from_msg to to_msg. The new
40       header is created using the header value from from_msg  and  param,  if
41       non-null, and appended to to_msg.
42
43
44       The  sip_copy_all_headers()  copies  all  the  headers from from_msg to
45       to_msg.
46

RETURN VALUES

48       These functions return 0 on success and the appropriate error on  fail‐
49       ure.
50
51
52       The  value  of  errno  is not changed by these calls in the event of an
53       error.
54

ERRORS

56       These functions can return one of the following errors in case of fail‐
57       ure:
58
59       EINVAL    If  the  required  input parameters are NULL or if the header
60                 being copied does not exist or is deleted in source SIP  mes‐
61                 sage.
62
63
64       ENOMEM    Error while allocating memory for creating the new header.
65
66
67       EPERM     If the input SIP message cannot be modified.
68
69

ATTRIBUTES

71       See attributes(5) for descriptions of the following attributes:
72
73
74
75
76       ┌─────────────────────────────┬─────────────────────────────┐
77       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
78       ├─────────────────────────────┼─────────────────────────────┤
79       │Interface Stability          │Committed                    │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │MT-Level                     │MT-Safe                      │
82       └─────────────────────────────┴─────────────────────────────┘
83

SEE ALSO

85       libsip(3LIB)
86
87
88
89SunOS 5.11                        25 Jan 2007        sip_copy_start_line(3SIP)
Impressum