1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<section id="via_body" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
<revhistory>
<revision>
<revnumber>$Revision$</revnumber>
<date>$Date$</date>
</revision>
</revhistory>
</sectioninfo>
<title>Structure <structname>via_body</structname></title>
<para>
The structure represents parsed Via header field. See file
<filename>parse_via.h</filename> under <filename>parser</filename>
subdirectory for more details.
</para>
<programlisting>
struct via_body {
int error;
str hdr; /* Contains "Via" or "v" */
str name;
str version;
str transport;
str host;
int port;
str port_str;
str params;
str comment;
int bsize; /* body size, not including hdr */
struct via_param* param_lst; /* list of parameters*/
struct via_param* last_param; /*last via parameter, internal use*/
/* shortcuts to "important" params*/
struct via_param* branch;
struct via_param* received;
struct via_body* next; /* pointer to next via body string if
compact via or null */
};
</programlisting>
<para>
<emphasis>Field Description:</emphasis>
<itemizedlist>
<listitem>
<para>
<structfield>error</structfield> - The field contains error
code when the parser was unable to parse the header field.
</para>
</listitem>
<listitem>
<para>
<structfield>hdr</structfield>- Header field name, it can
be "Via" or "v" in this case.
</para>
</listitem>
<listitem>
<para>
<structfield>name</structfield> - Protocol name ("SIP" in
this case).
</para>
</listitem>
<listitem>
<para>
<structfield>version</structfield> - Protocol version (for
example "2.0").
</para>
</listitem>
<listitem>
<para>
<structfield>transport</structfield> - Transport protocol
name ("TCP", "UDP" and so on).
</para>
</listitem>
<listitem>
<para>
<structfield>host</structfield> - Hostname or IP address
contained in the Via header field.
</para>
</listitem>
<listitem>
<para>
<structfield>port</structfield> - Port number as integer.
</para>
</listitem>
<listitem>
<para>
<structfield>port_str</structfield> - Port number as string.
</para>
</listitem>
<listitem>
<para>
<structfield>params</structfield> - Unparsed parameters (as
one string containing all the parameters).
</para>
</listitem>
<listitem>
<para>
<structfield>comment</structfield> - Comment.
</para>
</listitem>
<listitem>
<para>
<structfield>bsize</structfield> - Size of the body (not including hdr).
</para>
</listitem>
<listitem>
<para>
<structfield>param_lst</structfield> - Linked list of all parameters.
</para>
</listitem>
<listitem>
<para>
<structfield>last_param</structfield> - Last parameter in the list.
</para>
</listitem>
<listitem>
<para>
<structfield>branch</structfield> - Branch parameter.
</para>
</listitem>
<listitem>
<para>
<structfield>received</structfield> - Received parameter.
</para>
</listitem>
<listitem>
<para>
<structfield>next</structfield> - If the Via is in compact
form (more Vias in the same header field), this field
contains pointer to the next Via.
</para>
</listitem>
</itemizedlist>
</para>
</section>
|