21 #define VIA_PARSE_OK 1
22 #define VIA_PARSE_ERROR -1
24 #define SIP_VERSION "SIP/2.0"
43 struct hdr_field{ /* format: name':' body */
49 struct via_body{ /* format: name/version/transport host:port;params comment */
51 char *hdr; /* contains "Via" or "v" */
59 int size; /* full size, including hdr */
60 char* next; /* pointer to next via body string if compact via or null */
64 struct msg_start first_line;
71 char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl);
72 char* get_hdr_field(char *buffer, unsigned int len, struct hdr_field* hdr_f);
73 int field_name(char *s);
74 char* parse_hostport(char* buf, char** host, short int* port);
75 char* parse_via_body(char* buffer,unsigned int len, struct via_body * vb);
76 int parse_msg(char* buf, unsigned int len, struct sip_msg* msg);