17 #ifndef MINIUPNPC_ASYNC_H_INCLUDED 18 #define MINIUPNPC_ASYNC_H_INCLUDED 21 #include <netinet/in.h> 23 #include <sys/select.h> 33 #define UPNPC_ERR_INVALID_ARGS (-1) 34 #define UPNPC_ERR_SOCKET_FAILED (-2) 35 #define UPNPC_ERR_BIND_FAILED (-3) 36 #define UPNPC_ERR_UNKNOWN_STATE (-4) 38 #define UPNPC_SSDP_READABLE 0x0001 39 #define UPNPC_SSDP_WRITEABLE 0x0100 40 #define UPNPC_HTTP_READABLE 0x0002 41 #define UPNPC_HTTP_WRITEABLE 0x0200 101 const char * remote_host,
unsigned short ext_port,
102 unsigned short int_port,
const char * int_client,
103 const char * proto,
const char * description,
104 unsigned int lease_duration);
106 #ifdef UPNPC_USE_SELECT 107 int upnpc_select_fds(
upnpc_t * p,
int * nfds, fd_set * readfds, fd_set * writefds);
108 void upnpc_check_select_fds(
upnpc_t * p,
const fd_set * readfds,
const fd_set * writefds);
int upnpc_get_link_layer_max_rate(upnpc_device_t *p)
int upnpc_init(upnpc_t *p, const char *multicastif)
int http_response_content_length
int upnpc_get_external_ip_address(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 http_response_chunked
upnpc_device_t * device_list
struct NameValueParserData soap_response_data
int upnpc_process(upnpc_t *p)
struct sockaddr_storage selfaddr
int http_response_received
int upnpc_finalize(upnpc_t *p)
struct upnpc_device * next
char * root_desc_location
int http_response_end_of_headers
struct upnpc_device upnpc_device_t
enum upnpc_device::@2 state