#include <stdio.h>#include <assert.h>#include <string.h>#include <netinet/in.h>#include "../../mem/mem.h"#include "../../parser/msg_parser.h"#include "../../dprint.h"#include "encode_uri.h"#include "encode_parameters.h"#include "encode_header.h"#include "xaddress.h"

Go to the source code of this file.
Defines | |
| #define | _GNU_SOURCE |
| #define | REL_PTR(a, b) ((unsigned char)(b-a)) |
| #define | SIP_SCH 0x3a706973 |
| #define | SIPS_SCH 0x73706973 |
| #define | TEL_SCH 0x3a6c6574 |
| #define | TELS_SCH 0x736c6574 |
Functions | |
| int | encode_uri2 (char *hdr, int hdrlen, str uri_str, struct sip_uri *uri_parsed, unsigned char *payload) |
| int | print_encoded_uri (FILE *fd, unsigned char *payload, int paylen, char *hdrstart, int hdrlen, char *prefix) |
| int | print_uri_junit_tests (char *hdrstart, int hdrlen, unsigned char *payload, int paylen, FILE *fd, char also_hdr, char *prefix) |
| #define _GNU_SOURCE |
Definition at line 40 of file encode_uri.c.
| #define REL_PTR | ( | a, | |||
| b | ) | ((unsigned char)(b-a)) |
Definition at line 53 of file encode_uri.c.
| #define SIP_SCH 0x3a706973 |
Referenced by encode_uri2(), and parse_uri().
| #define SIPS_SCH 0x73706973 |
Referenced by encode_uri2(), and parse_uri().
| #define TEL_SCH 0x3a6c6574 |
Referenced by encode_uri2(), and parse_uri().
| #define TELS_SCH 0x736c6574 |
Referenced by encode_uri2().
| int encode_uri2 | ( | char * | hdr, | |
| int | hdrlen, | |||
| str | uri_str, | |||
| struct sip_uri * | uri_parsed, | |||
| unsigned char * | payload | |||
| ) |
Definition at line 116 of file encode_uri.c.
References encode_parameters(), sip_uri::headers, HEADERS_F, sip_uri::host, HOST_F, _str::len, LM_ERR, sip_uri::lr, LR_F, sip_uri::maddr, MADDR_F, sip_uri::method, METHOD_F, PARAMETERS_F, sip_uri::params, sip_uri::passwd, PASSWORD_F, sip_uri::port, PORT_F, REL_PTR, _str::s, SECURE_F, SIP_OR_TEL_F, SIP_SCH, SIPS_SCH, TEL_SCH, TELS_SCH, sip_uri::transport, TRANSPORT_F, sip_uri::ttl, TTL_F, sip_uri::user, USER_F, and sip_uri::user_param.
Referenced by encode_contact(), encode_digest(), encode_msg(), encode_route(), and encode_to_body().
| int print_encoded_uri | ( | FILE * | fd, | |
| unsigned char * | payload, | |||
| int | paylen, | |||
| char * | hdrstart, | |||
| int | hdrlen, | |||
| char * | prefix | |||
| ) |
Definition at line 241 of file encode_uri.c.
References HEADERS_F, HOST_F, LR_F, MADDR_F, METHOD_F, NULL, PARAMETERS_F, PASSWORD_F, PORT_F, print_encoded_parameters(), SECURE_F, SIP_OR_TEL_F, TRANSPORT_F, TTL_F, and USER_F.
Referenced by print_encoded_contact(), print_encoded_digest(), print_encoded_msg(), print_encoded_route(), and print_encoded_to_body().
| int print_uri_junit_tests | ( | char * | hdrstart, | |
| int | hdrlen, | |||
| unsigned char * | payload, | |||
| int | paylen, | |||
| FILE * | fd, | |||
| char | also_hdr, | |||
| char * | prefix | |||
| ) |
Definition at line 317 of file encode_uri.c.
References dump_standard_hdr_test(), HEADERS_F, HOST_F, LR_F, MADDR_F, METHOD_F, NULL, PARAMETERS_F, PASSWORD_F, PORT_F, SECURE_F, SIP_OR_TEL_F, TRANSPORT_F, TTL_F, and USER_F.
Referenced by dump_contact_test(), dump_digest_test(), dump_msg_test(), dump_route_test(), and dump_to_body_test().
1.5.6