SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
oSIP via header definition.
Collaboration diagram for oSIP via header definition.:

Data Structures

struct  osip_via
 Definition of the Via header. More...
 

Macros

#define osip_via_set_version   via_set_version
 
#define osip_via_get_version   via_get_version
 
#define osip_via_set_protocol   via_set_protocol
 
#define osip_via_get_protocol   via_get_protocol
 
#define osip_via_set_host   via_set_host
 
#define osip_via_get_host   via_get_host
 
#define osip_via_set_port   via_set_port
 
#define osip_via_get_port   via_get_port
 
#define osip_via_set_comment   via_set_comment
 
#define osip_via_get_comment   via_get_comment
 
#define osip_via_set_hidden(header)   osip_generic_param_add((&(header)->via_params),osip_strdup("hidden"),NULL)
 Allocate and add a hidden parameter element in a list. More...
 
#define osip_via_set_ttl(header, value)   osip_generic_param_add((&(header)->via_params),osip_strdup("ttl"),value)
 Allocate and add a ttl parameter element in a list. More...
 
#define osip_via_set_maddr(header, value)   osip_generic_param_add((&(header)->via_params),osip_strdup("maddr"),value)
 Allocate and add a maddr parameter element in a list. More...
 
#define osip_via_set_received(header, value)   osip_generic_param_add((&(header)->via_params),osip_strdup("received"),value)
 Allocate and add a received parameter element in a list. More...
 
#define osip_via_set_branch(header, value)   osip_generic_param_add((&(header)->via_params),osip_strdup("branch"),value)
 Allocate and add a branch parameter element in a list. More...
 
#define osip_via_param_add(header, name, value)   osip_generic_param_add((&(header)->via_params),name,value)
 Allocate and add a generic parameter element in a list. More...
 
#define osip_via_param_get_byname(header, name, dest)   osip_generic_param_get_byname((&(header)->via_params),name,dest)
 Find a header parameter in a Via element. More...
 

Typedefs

typedef struct osip_via osip_via_t
 Structure for Via headers. More...
 

Functions

int osip_via_init (osip_via_t **header)
 Allocate a Via element. More...
 
void osip_via_free (osip_via_t *header)
 Free a Via element. More...
 
int osip_via_parse (osip_via_t *header, const char *hvalue)
 Parse a Via element. More...
 
int osip_via_to_str (const osip_via_t *header, char **dest)
 Get a string representation of a Via element. More...
 
int osip_via_clone (const osip_via_t *header, osip_via_t **dest)
 Clone a Via element. More...
 
void via_set_version (osip_via_t *header, char *value)
 Set the SIP version in the Via element. More...
 
char * via_get_version (osip_via_t *header)
 Get the SIP version from a Via header. More...
 
void via_set_protocol (osip_via_t *header, char *value)
 Set the protocol in the Via element. More...
 
char * via_get_protocol (osip_via_t *header)
 Get the protocol from a Via header. More...
 
void via_set_host (osip_via_t *header, char *value)
 Set the host in the Via element. More...
 
char * via_get_host (osip_via_t *header)
 Get the host from a Via header. More...
 
void via_set_port (osip_via_t *header, char *value)
 Set the port in the Via element. More...
 
char * via_get_port (osip_via_t *header)
 Get the port from a Via header. More...
 
void via_set_comment (osip_via_t *header, char *value)
 Set the comment in the Via element. More...
 
char * via_get_comment (osip_via_t *header)
 Get the comment from a Via header. More...
 
int osip_via_match (osip_via_t *via1, osip_via_t *via2)
 Check if the Via headers match. More...
 

Detailed Description

Macro Definition Documentation

#define osip_via_get_comment   via_get_comment

#include <osip_via.h>

Definition at line 154 of file osip_via.h.

#define osip_via_get_host   via_get_host

#include <osip_via.h>

Definition at line 128 of file osip_via.h.

#define osip_via_get_port   via_get_port

#include <osip_via.h>

Definition at line 141 of file osip_via.h.

#define osip_via_get_protocol   via_get_protocol

#include <osip_via.h>

Definition at line 115 of file osip_via.h.

#define osip_via_get_version   via_get_version

#include <osip_via.h>

Definition at line 102 of file osip_via.h.

#define osip_via_param_add (   header,
  name,
  value 
)    osip_generic_param_add((&(header)->via_params),name,value)

#include <osip_via.h>

Allocate and add a generic parameter element in a list.

Parameters
headerThe element to work on.
nameThe token name.
valueThe token value.

Definition at line 192 of file osip_via.h.

#define osip_via_param_get_byname (   header,
  name,
  dest 
)    osip_generic_param_get_byname((&(header)->via_params),name,dest)

#include <osip_via.h>

Find a header parameter in a Via element.

Parameters
headerThe element to work on.
nameThe token name to search.
destA pointer on the element found.

Definition at line 199 of file osip_via.h.

#define osip_via_set_branch (   header,
  value 
)    osip_generic_param_add((&(header)->via_params),osip_strdup("branch"),value)

#include <osip_via.h>

Allocate and add a branch parameter element in a list.

Parameters
headerThe element to work on.
valueThe token value.

Definition at line 184 of file osip_via.h.

#define osip_via_set_comment   via_set_comment

#include <osip_via.h>

Definition at line 148 of file osip_via.h.

#define osip_via_set_hidden (   header)    osip_generic_param_add((&(header)->via_params),osip_strdup("hidden"),NULL)

#include <osip_via.h>

Allocate and add a hidden parameter element in a list.

Parameters
headerThe element to work on.

Definition at line 160 of file osip_via.h.

#define osip_via_set_host   via_set_host

#include <osip_via.h>

Definition at line 122 of file osip_via.h.

#define osip_via_set_maddr (   header,
  value 
)    osip_generic_param_add((&(header)->via_params),osip_strdup("maddr"),value)

#include <osip_via.h>

Allocate and add a maddr parameter element in a list.

Parameters
headerThe element to work on.
valueThe token value.

Definition at line 172 of file osip_via.h.

#define osip_via_set_port   via_set_port

#include <osip_via.h>

Definition at line 135 of file osip_via.h.

#define osip_via_set_protocol   via_set_protocol

#include <osip_via.h>

Definition at line 109 of file osip_via.h.

#define osip_via_set_received (   header,
  value 
)    osip_generic_param_add((&(header)->via_params),osip_strdup("received"),value)

#include <osip_via.h>

Allocate and add a received parameter element in a list.

Parameters
headerThe element to work on.
valueThe token value.

Definition at line 178 of file osip_via.h.

#define osip_via_set_ttl (   header,
  value 
)    osip_generic_param_add((&(header)->via_params),osip_strdup("ttl"),value)

#include <osip_via.h>

Allocate and add a ttl parameter element in a list.

Parameters
headerThe element to work on.
valueThe token value.

Definition at line 166 of file osip_via.h.

#define osip_via_set_version   via_set_version

#include <osip_via.h>

Definition at line 96 of file osip_via.h.

Typedef Documentation

#include <osip_via.h>

Structure for Via headers.

Definition at line 41 of file osip_via.h.

Function Documentation

int osip_via_clone ( const osip_via_t header,
osip_via_t **  dest 
)

#include <osip_via.h>

Clone a Via element.

Parameters
headerThe element to work on.
destA pointer on the copy of the element.
void osip_via_free ( osip_via_t header)

#include <osip_via.h>

Free a Via element.

Parameters
headerThe element to work on.
int osip_via_init ( osip_via_t **  header)

#include <osip_via.h>

Allocate a Via element.

Parameters
headerThe element to work on.
int osip_via_match ( osip_via_t via1,
osip_via_t via2 
)

#include <osip_via.h>

Check if the Via headers match.

NOTE: THIS IS AN INTERNAL METHOD ONLY

Parameters
via1The first Via header.
via2The second Via header.
int osip_via_parse ( osip_via_t header,
const char *  hvalue 
)

#include <osip_via.h>

Parse a Via element.

Parameters
headerThe element to work on.
hvalueThe string to parse.
int osip_via_to_str ( const osip_via_t header,
char **  dest 
)

#include <osip_via.h>

Get a string representation of a Via element.

Parameters
headerThe element to work on.
destA pointer on the new allocated string.
char* via_get_comment ( osip_via_t header)

#include <osip_via.h>

Get the comment from a Via header.

Parameters
headerThe element to work on.
char* via_get_host ( osip_via_t header)

#include <osip_via.h>

Get the host from a Via header.

Parameters
headerThe element to work on.
char* via_get_port ( osip_via_t header)

#include <osip_via.h>

Get the port from a Via header.

Parameters
headerThe element to work on.
char* via_get_protocol ( osip_via_t header)

#include <osip_via.h>

Get the protocol from a Via header.

Parameters
headerThe element to work on.
char* via_get_version ( osip_via_t header)

#include <osip_via.h>

Get the SIP version from a Via header.

Parameters
headerThe element to work on.
void via_set_comment ( osip_via_t header,
char *  value 
)

#include <osip_via.h>

Set the comment in the Via element.

Parameters
headerThe element to work on.
valueThe value of the element.
void via_set_host ( osip_via_t header,
char *  value 
)

#include <osip_via.h>

Set the host in the Via element.

Parameters
headerThe element to work on.
valueThe value of the element.
void via_set_port ( osip_via_t header,
char *  value 
)

#include <osip_via.h>

Set the port in the Via element.

Parameters
headerThe element to work on.
valueThe value of the element.
void via_set_protocol ( osip_via_t header,
char *  value 
)

#include <osip_via.h>

Set the protocol in the Via element.

Parameters
headerThe element to work on.
valueThe value of the element.
void via_set_version ( osip_via_t header,
char *  value 
)

#include <osip_via.h>

Set the SIP version in the Via element.

Parameters
headerThe element to work on.
valueThe value of the element.