Electroneum
Loading...
Searching...
No Matches
miniupnpc-async.h
Go to the documentation of this file.
1/* $Id: miniupnpc-async.h,v 1.13 2014/11/07 11:25:52 nanard Exp $ */
2/* miniupnpc-async
3 * Copyright (c) 2008-2017, Thomas BERNARD <miniupnp@free.fr>
4 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
17#ifndef MINIUPNPC_ASYNC_H_INCLUDED
18#define MINIUPNPC_ASYNC_H_INCLUDED
19
20/* for struct sockaddr_storage */
21#include <netinet/in.h>
22/* for fd_set */
23#include <sys/select.h>
24
25#include "declspec.h"
26#include "upnpreplyparse.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#define UPNPC_OK 0
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)
37
38#define UPNPC_SSDP_READABLE 0x0001
39#define UPNPC_SSDP_WRITEABLE 0x0100
40#define UPNPC_HTTP_READABLE 0x0002
41#define UPNPC_HTTP_WRITEABLE 0x0200
42
75
91
92int upnpc_init(upnpc_t * p, const char * multicastif);
93
95
97
99
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);
105
106#ifdef UPNPC_USE_SELECT
107int upnpc_select_fds(upnpc_t * p, int * nfds, fd_set * readfds, fd_set * writefds);
108void upnpc_check_select_fds(upnpc_t * p, const fd_set * readfds, const fd_set * writefds);
109#endif /* UPNPC_USE_SELECT */
110
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif /* MINIUPNPC_ASYNC_H_INCLUDED */
118
int upnpc_finalize(upnpc_t *p)
int upnpc_process(upnpc_t *p)
int upnpc_init(upnpc_t *p, const char *multicastif)
int upnpc_get_link_layer_max_rate(upnpc_device_t *p)
struct upnpc_device upnpc_device_t
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_get_external_ip_address(upnpc_device_t *p)
socklen_t selfaddrlen
struct NameValueParserData soap_response_data
int http_response_content_length
int http_response_end_of_headers
struct upnpc_device * next
char * control_cif_url
char * root_desc_location
char * control_conn_url
struct sockaddr_storage selfaddr
upnpc_device_t * device_list