RetroArch
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <net/if.h>
#include <poll.h>
#include <strings.h>
#include <errno.h>
#include "miniupnpc.h"
#include "minissdpc.h"
#include "miniwget.h"
#include "minisoap.h"
#include "minixml.h"
#include "upnpcommands.h"
#include "connecthostport.h"
Macros | |
#define | closesocket close |
#define | COMPARE(str, cstr) (0==memcmp(str, cstr, sizeof(cstr) - 1)) |
#define | MAXHOSTNAMELEN 64 |
#define | SOAPPREFIX "s" |
#define | SERVICEPREFIX "u" |
#define | SERVICEPREFIX2 'u' |
Functions | |
static int | is_rfc1918addr (const char *addr) |
MINIUPNP_LIBSPEC void | parserootdesc (const char *buffer, int bufsize, struct IGDdatas *data) |
char * | simpleUPnPcommand2 (int s, const char *url, const char *service, const char *action, struct UPNParg *args, int *bufsize, const char *httpversion) |
char * | simpleUPnPcommand (int s, const char *url, const char *service, const char *action, struct UPNParg *args, int *bufsize) |
MINIUPNP_LIBSPEC struct UPNPDev * | upnpDiscoverDevices (const char *const deviceTypes[], int delay, const char *multicastif, const char *minissdpdsock, int localport, int ipv6, unsigned char ttl, int *error, int searchalltypes) |
MINIUPNP_LIBSPEC struct UPNPDev * | upnpDiscover (int delay, const char *multicastif, const char *minissdpdsock, int localport, int ipv6, unsigned char ttl, int *error) |
MINIUPNP_LIBSPEC struct UPNPDev * | upnpDiscoverAll (int delay, const char *multicastif, const char *minissdpdsock, int localport, int ipv6, unsigned char ttl, int *error) |
MINIUPNP_LIBSPEC struct UPNPDev * | upnpDiscoverDevice (const char *device, int delay, const char *multicastif, const char *minissdpdsock, int localport, int ipv6, unsigned char ttl, int *error) |
static char * | build_absolute_url (const char *baseurl, const char *descURL, const char *url, unsigned int scope_id) |
MINIUPNP_LIBSPEC void | GetUPNPUrls (struct UPNPUrls *urls, struct IGDdatas *data, const char *descURL, unsigned int scope_id) |
MINIUPNP_LIBSPEC void | FreeUPNPUrls (struct UPNPUrls *urls) |
int | UPNPIGD_IsConnected (struct UPNPUrls *urls, struct IGDdatas *data) |
MINIUPNP_LIBSPEC int | UPNP_GetValidIGD (struct UPNPDev *devlist, struct UPNPUrls *urls, struct IGDdatas *data, char *lanaddr, int lanaddrlen) |
int | UPNP_GetIGDFromUrl (const char *rootdescurl, struct UPNPUrls *urls, struct IGDdatas *data, char *lanaddr, int lanaddrlen) |
#define closesocket close |
#define MAXHOSTNAMELEN 64 |
#define SERVICEPREFIX "u" |
#define SERVICEPREFIX2 'u' |
#define SOAPPREFIX "s" |
|
static |
MINIUPNP_LIBSPEC void FreeUPNPUrls | ( | struct UPNPUrls * | urls | ) |
MINIUPNP_LIBSPEC void GetUPNPUrls | ( | struct UPNPUrls * | urls, |
struct IGDdatas * | data, | ||
const char * | descURL, | ||
unsigned int | scope_id | ||
) |
|
static |
MINIUPNP_LIBSPEC void parserootdesc | ( | const char * | buffer, |
int | bufsize, | ||
struct IGDdatas * | data | ||
) |
char* simpleUPnPcommand | ( | int | s, |
const char * | url, | ||
const char * | service, | ||
const char * | action, | ||
struct UPNParg * | args, | ||
int * | bufsize | ||
) |
char* simpleUPnPcommand2 | ( | int | s, |
const char * | url, | ||
const char * | service, | ||
const char * | action, | ||
struct UPNParg * | args, | ||
int * | bufsize, | ||
const char * | httpversion | ||
) |
int UPNP_GetIGDFromUrl | ( | const char * | rootdescurl, |
struct UPNPUrls * | urls, | ||
struct IGDdatas * | data, | ||
char * | lanaddr, | ||
int | lanaddrlen | ||
) |
MINIUPNP_LIBSPEC int UPNP_GetValidIGD | ( | struct UPNPDev * | devlist, |
struct UPNPUrls * | urls, | ||
struct IGDdatas * | data, | ||
char * | lanaddr, | ||
int | lanaddrlen | ||
) |
MINIUPNP_LIBSPEC struct UPNPDev* upnpDiscover | ( | int | delay, |
const char * | multicastif, | ||
const char * | minissdpdsock, | ||
int | localport, | ||
int | ipv6, | ||
unsigned char | ttl, | ||
int * | error | ||
) |
MINIUPNP_LIBSPEC struct UPNPDev* upnpDiscoverAll | ( | int | delay, |
const char * | multicastif, | ||
const char * | minissdpdsock, | ||
int | localport, | ||
int | ipv6, | ||
unsigned char | ttl, | ||
int * | error | ||
) |
MINIUPNP_LIBSPEC struct UPNPDev* upnpDiscoverDevice | ( | const char * | device, |
int | delay, | ||
const char * | multicastif, | ||
const char * | minissdpdsock, | ||
int | localport, | ||
int | ipv6, | ||
unsigned char | ttl, | ||
int * | error | ||
) |
MINIUPNP_LIBSPEC struct UPNPDev* upnpDiscoverDevices | ( | const char *const | deviceTypes[], |
int | delay, | ||
const char * | multicastif, | ||
const char * | minissdpdsock, | ||
int | localport, | ||
int | ipv6, | ||
unsigned char | ttl, | ||
int * | error, | ||
int | searchalltypes | ||
) |