123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- #ifndef MINIUPNPC_H_INCLUDED
- #define MINIUPNPC_H_INCLUDED
- #include "miniupnpc_declspec.h"
- #include "igd_desc_parse.h"
- #include "upnpdev.h"
- #define UPNPDISCOVER_SUCCESS (0)
- #define UPNPDISCOVER_UNKNOWN_ERROR (-1)
- #define UPNPDISCOVER_SOCKET_ERROR (-101)
- #define UPNPDISCOVER_MEMORY_ERROR (-102)
- #define MINIUPNPC_VERSION "2.1"
- #define MINIUPNPC_API_VERSION 17
- #define UPNP_LOCAL_PORT_ANY 0
- #define UPNP_LOCAL_PORT_SAME 1
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct UPNParg { const char * elt; const char * val; };
- char *
- simpleUPnPcommand(int, const char *, const char *,
- const char *, struct UPNParg *,
- int *);
- 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);
- MINIUPNP_LIBSPEC void parserootdesc(const char *, int, struct IGDdatas *);
- struct UPNPUrls {
- char * controlURL;
- char * ipcondescURL;
- char * controlURL_CIF;
- char * controlURL_6FC;
- char * rootdescURL;
- };
- MINIUPNP_LIBSPEC int
- UPNP_GetValidIGD(struct UPNPDev * devlist,
- struct UPNPUrls * urls,
- struct IGDdatas * data,
- char * lanaddr, int lanaddrlen);
- MINIUPNP_LIBSPEC int
- UPNP_GetIGDFromUrl(const char * rootdescurl,
- struct UPNPUrls * urls,
- struct IGDdatas * data,
- char * lanaddr, int lanaddrlen);
- MINIUPNP_LIBSPEC void
- GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *,
- const char *, unsigned int);
- MINIUPNP_LIBSPEC void
- FreeUPNPUrls(struct UPNPUrls *);
- MINIUPNP_LIBSPEC int UPNPIGD_IsConnected(struct UPNPUrls *, struct IGDdatas *);
- #ifdef __cplusplus
- }
- #endif
- #endif
|