uri.h File Reference
#include <fcntl.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <errno.h>
#include <ctype.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/time.h>
#include "upnp.h"
Go to the source code of this file.
Data Structures |
| struct | TOKEN |
| struct | HOSTPORT |
| struct | URI |
| struct | URL_LIST |
Defines |
| #define | HTTP_DATE_LENGTH 37 |
| #define | SEPARATORS "()<>@,;:\\\"/[]?={} \t" |
| #define | MARK "-_.!~*'()" |
| #define | RESERVED ";/?:@&=+$,{}" |
| #define | HTTP_SUCCESS 1 |
| #define | FALSE 0 |
| #define | TAB 9 |
| #define | CR 13 |
| #define | LF 10 |
| #define | SOCKET_BUFFER_SIZE 5000 |
Typedefs |
| typedef struct TOKEN | token |
| typedef struct HOSTPORT | hostport_type |
| typedef struct URI | uri_type |
| typedef struct URL_LIST | URL_list |
Enumerations |
| enum | hostType { HOSTNAME,
IPv4address,
HOSTNAME,
IPv4address
} |
| enum | pathType {
ABS_PATH,
REL_PATH,
OPAQUE_PART,
ABS_PATH,
REL_PATH,
OPAQUE_PART
} |
| enum | uriType { ABSOLUTE,
RELATIVE,
ABSOLUTE,
RELATIVE
} |
Functions |
| int | replace_escaped (char *in, int index, int *max) |
| int | copy_URL_list (URL_list *in, URL_list *out) |
| void | free_URL_list (URL_list *list) |
| void | print_token (token *in) |
| int | token_string_casecmp (token *in1, char *in2) |
| int | token_string_cmp (token *in1, char *in2) |
| int | token_cmp (token *in1, token *in2) |
| int | parse_port (int max, const char *port, unsigned short int *out) |
| int | parse_hostport (const char *in, int max, hostport_type *out) |
| int | remove_escaped_chars (char *in, int *size) |
| int | remove_dots (char *in, int size) |
| char * | resolve_rel_url (char *base_url, char *rel_url) |
| int | parse_uri (const char *in, int max, uri_type *out) |
| int | parse_uri_and_unescape (char *in, int max, uri_type *out) |
| int | parse_token (char *in, token *out, int max_size) |
Define Documentation
Definition at line 72 of file uri.h.
Definition at line 70 of file uri.h.
| #define HTTP_DATE_LENGTH 37 |
Definition at line 63 of file uri.h.
Definition at line 68 of file uri.h.
Definition at line 73 of file uri.h.
Definition at line 66 of file uri.h.
| #define RESERVED ";/?:@&=+$,{}" |
Definition at line 67 of file uri.h.
| #define SEPARATORS "()<>@,;:\\\"/[]?={} \t" |
Definition at line 65 of file uri.h.
| #define SOCKET_BUFFER_SIZE 5000 |
Definition at line 74 of file uri.h.
Definition at line 71 of file uri.h.
Typedef Documentation
Enumeration Type Documentation
- Enumerator:
| HOSTNAME |
|
| IPv4address |
|
| HOSTNAME |
|
| IPv4address |
|
Definition at line 76 of file uri.h.
- Enumerator:
| ABS_PATH |
|
| REL_PATH |
|
| OPAQUE_PART |
|
| ABS_PATH |
|
| REL_PATH |
|
| OPAQUE_PART |
|
Definition at line 77 of file uri.h.
- Enumerator:
| ABSOLUTE |
|
| RELATIVE |
|
| ABSOLUTE |
|
| RELATIVE |
|
Definition at line 80 of file uri.h.
Function Documentation
| int parse_hostport |
( |
const char * |
in, |
|
|
int |
max, |
|
|
hostport_type * |
out | |
|
) |
| | |
| int parse_port |
( |
int |
max, |
|
|
const char * |
port, |
|
|
unsigned short int * |
out | |
|
) |
| | |
| int parse_token |
( |
char * |
in, |
|
|
token * |
out, |
|
|
int |
max_size | |
|
) |
| | |
| int parse_uri |
( |
const char * |
in, |
|
|
int |
max, |
|
|
uri_type * |
out | |
|
) |
| | |
| int parse_uri_and_unescape |
( |
char * |
in, |
|
|
int |
max, |
|
|
uri_type * |
out | |
|
) |
| | |
| void print_token |
( |
token * |
in |
) |
|
| int remove_dots |
( |
char * |
in, |
|
|
int |
size | |
|
) |
| | |
| int remove_escaped_chars |
( |
char * |
in, |
|
|
int * |
size | |
|
) |
| | |
| int replace_escaped |
( |
char * |
in, |
|
|
int |
index, |
|
|
int * |
max | |
|
) |
| | |
| char* resolve_rel_url |
( |
char * |
base_url, |
|
|
char * |
rel_url | |
|
) |
| | |
| int token_string_casecmp |
( |
token * |
in1, |
|
|
char * |
in2 | |
|
) |
| | |
| int token_string_cmp |
( |
token * |
in1, |
|
|
char * |
in2 | |
|
) |
| | |