FreeCalypso > hg > sipout-test-utils
comparison libsip/parse.h @ 0:35c0d9f03c0a
beginning with sipout-test-voice,
a copy of sip-manual-out from themwi-system-sw
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 03 Mar 2024 23:20:19 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:35c0d9f03c0a |
---|---|
1 /* | |
2 * Here we define the structure we are going to use for receiving | |
3 * and parsing SIP UDP packets. | |
4 */ | |
5 | |
6 #define MAX_SIP_RX_PACKET 3072 | |
7 #define MAX_HEADER_FIELDS 64 | |
8 | |
9 struct sip_parse_hdr { | |
10 char *field_name; | |
11 char *field_value; | |
12 }; | |
13 | |
14 struct sip_pkt_rx { | |
15 /* recvfrom on UDP socket, input to parser */ | |
16 char pkt_buffer[MAX_SIP_RX_PACKET]; | |
17 unsigned pkt_length; | |
18 /* filled by parser */ | |
19 int parse_msgtype; | |
20 char *req_method; | |
21 char *req_uri; | |
22 unsigned status_code; | |
23 char *status_str; | |
24 /* header fields */ | |
25 struct sip_parse_hdr hdr_fields[MAX_HEADER_FIELDS]; | |
26 unsigned num_hdr_fields; | |
27 /* optional message body */ | |
28 char *msg_body; | |
29 unsigned msg_body_len; | |
30 }; | |
31 | |
32 #define SIP_MSG_TYPE_REQ 1 | |
33 #define SIP_MSG_TYPE_RESP 2 |