|
Monero
|
#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include <net/if.h>#include <stdio.h>#include <unistd.h>#include <errno.h>#include "miniupnpc-async.h"#include "parsessdpreply.h"#include "upnputils.h"#include "minixml.h"#include "igd_desc_parse.h"#include "upnpreplyparse.h"
Classes | |
| struct | upnp_args |
Macros | |
| #define | closesocket close |
| #define | PRINT_SOCKET_ERROR perror |
| #define | SOCKET_ERROR errno |
| #define | WOULDBLOCK(err) |
| #define | MIN(x, y) |
| #define | MAXHOSTNAMELEN 64 |
| #define | SSDP_PORT 1900 |
| #define | SSDP_MCAST_ADDR "239.255.255.250" |
| #define | XSTR(s) |
| #define | STR(s) |
| #define | debug_printf(...) |
| #define | SOAPPREFIX "s" |
| #define | SERVICEPREFIX "u" |
| #define | SERVICEPREFIX2 'u' |
Functions | |
| static int | upnpc_connect (upnpc_device_t *p, const char *url) |
| static int | upnpc_send_request (upnpc_device_t *p) |
| static void | parse_msearch_reply (const char *reply, int size, const char **location, unsigned int *locationsize, const char **st, unsigned int *stsize) |
| static int | upnpc_send_ssdp_msearch (upnpc_t *p, const char *device, unsigned int mx) |
| static int | upnpc_set_root_desc_location (upnpc_device_t *d, const char *location, int locationsize) |
| static int | upnpc_receive_and_parse_ssdp (upnpc_t *p) |
| static int | parseURL (const char *url, char *hostname, unsigned short *port, char **path, unsigned int *scope_id) |
| static int | upnpc_complete_connect (upnpc_device_t *p) |
| static int | upnpc_parse_headers (upnpc_device_t *p) |
| static char * | build_url_string (const char *urlbase, const char *root_desc_url, const char *controlurl) |
| static int | upnpc_get_response (upnpc_device_t *p) |
| static int | upnpc_build_soap_request (upnpc_device_t *p, const char *url, const char *service, const char *action, const struct upnp_args *args, int arg_count) |
| int | upnpc_init (upnpc_t *p, const char *multicastif) |
| int | upnpc_finalize (upnpc_t *p) |
| int | upnpc_get_external_ip_address (upnpc_device_t *p) |
| int | upnpc_get_link_layer_max_rate (upnpc_device_t *p) |
| int | upnpc_add_port_mapping (upnpc_device_t *p, const char *remote_host, unsigned short ext_port, unsigned short int_port, const char *int_client, const char *proto, const char *description, unsigned int lease_duration) |
| int | upnpc_process (upnpc_t *p) |
Variables | |
| static const char * | devices_to_search [] |
| #define closesocket close |
| #define debug_printf | ( | ... | ) |
| #define MAXHOSTNAMELEN 64 |
| #define MIN | ( | x, | |
| y ) |
| #define PRINT_SOCKET_ERROR perror |
| #define SERVICEPREFIX "u" |
| #define SERVICEPREFIX2 'u' |
| #define SOAPPREFIX "s" |
| #define SOCKET_ERROR errno |
| #define SSDP_MCAST_ADDR "239.255.255.250" |
| #define SSDP_PORT 1900 |
| #define STR | ( | s | ) |
| #define WOULDBLOCK | ( | err | ) |
| #define XSTR | ( | s | ) |
|
static |
|
static |
|
static |
| int upnpc_add_port_mapping | ( | upnpc_device_t * | p, |
| const char * | remote_host, | ||
| unsigned short | ext_port, | ||
| unsigned short | int_port, | ||
| const char * | int_client, | ||
| const char * | proto, | ||
| const char * | description, | ||
| unsigned int | lease_duration ) |
|
static |
|
static |
|
static |
| int upnpc_finalize | ( | upnpc_t * | p | ) |
| int upnpc_get_external_ip_address | ( | upnpc_device_t * | p | ) |
| int upnpc_get_link_layer_max_rate | ( | upnpc_device_t * | p | ) |
|
static |
|
static |
| int upnpc_process | ( | upnpc_t * | p | ) |
|
static |
|
static |
|
static |
|
static |