Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

#define SIP_PAYLOAD_INIT2 ( data,
length   )     {{{ 0, 0, sip_payload_class, data, length }, NULL, data, length }}

Initialize a SIP payload structure with pointer to data and its length.

The SIP_PAYLOAD_INIT2() macro initializes a sip_payload_t header structure with a pointer to data and its length in octets. For instance,

  sip_payload_t txt_payload = SIP_PAYLOAD_INIT2(txt, strlen(txt));

The SIP_PAYLOAD_INIT2() macro can be used when creating a new payload from heap is not required, for instance, when the resulting payload structure is immediately copied.

Definition at line 312 of file sip_header.h.

Generated by  Doxygen 1.6.0   Back to index