mUPnP for C
|
#include <mupnp/typedef.h>
#include <mupnp/util/string.h>
#include <mupnp/util/list.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Data Structures | |
struct | _mUpnpNetworkInterface |
Macros | |
#define | MUPNP_NET_IPV4_ADDRSTRING_MAXSIZE ((3 * 4) + (1 * 3) + 1) |
#define | MUPNP_NET_IPV6_ADDRSTRING_MAXSIZE (1 + (8 * 4) + (1 * 7) + 1 + 1) |
#define | MUPNP_NET_IPV4_LOOPBACK "127.0.0.1" |
#define | MUPNP_NET_IPV6_LOOPBACK "fixmelater" |
#define | MUPNP_NET_MACADDR_SIZE 6 |
#define | mupnp_net_interface_next(netIf) |
#define | mupnp_net_interface_remove(netIf) |
#define | mupnp_net_interface_setmacaddress(netIf, value) |
#define | mupnp_net_interface_getmacaddress(netIf, buf) |
#define | mupnp_net_interface_setindex(netIf, value) |
#define | mupnp_net_interface_getindex(netIf, buf) |
#define | mupnp_net_interfacelist_clear(netIfList) |
#define | mupnp_net_interfacelist_size(netIfList) |
#define | mupnp_net_interfacelist_gets(netIfList) |
#define | mupnp_net_interfacelist_add(netIfList, netIf) |
Typedefs | |
typedef struct _mUpnpNetworkInterface | mUpnpNetworkInterface |
typedef struct _mUpnpNetworkInterface | mUpnpNetworkInterfaceList |
#define mupnp_net_interface_getindex | ( | netIf, | |
buf ) |
#define mupnp_net_interface_getmacaddress | ( | netIf, | |
buf ) |
#define mupnp_net_interface_next | ( | netIf | ) |
#define mupnp_net_interface_remove | ( | netIf | ) |
#define mupnp_net_interface_setindex | ( | netIf, | |
value ) |
#define mupnp_net_interface_setmacaddress | ( | netIf, | |
value ) |
#define mupnp_net_interfacelist_add | ( | netIfList, | |
netIf ) |
#define mupnp_net_interfacelist_clear | ( | netIfList | ) |
#define mupnp_net_interfacelist_gets | ( | netIfList | ) |
#define mupnp_net_interfacelist_size | ( | netIfList | ) |
#define MUPNP_NET_IPV4_ADDRSTRING_MAXSIZE ((3 * 4) + (1 * 3) + 1) |
#define MUPNP_NET_IPV4_LOOPBACK "127.0.0.1" |
#define MUPNP_NET_IPV6_ADDRSTRING_MAXSIZE (1 + (8 * 4) + (1 * 7) + 1 + 1) |
#define MUPNP_NET_IPV6_LOOPBACK "fixmelater" |
#define MUPNP_NET_MACADDR_SIZE 6 |
typedef struct _mUpnpNetworkInterface mUpnpNetworkInterface |
typedef struct _mUpnpNetworkInterface mUpnpNetworkInterfaceList |
int mupnp_net_gethostinterfaces | ( | mUpnpNetworkInterfaceList * | netIfList | ) |
int mupnp_net_getipv6scopeid | ( | const char * | addr | ) |
int mupnp_net_interface_cmp | ( | mUpnpNetworkInterface * | netIfA, |
mUpnpNetworkInterface * | netIfB ) |
Compares two interfaces based on IP-address.
void mupnp_net_interface_delete | ( | mUpnpNetworkInterface * | netIf | ) |
char * mupnp_net_interface_getaddress | ( | mUpnpNetworkInterface * | netIf | ) |
mUpnpNetworkInterface * mupnp_net_interface_getany | ( | void | ) |
char * mupnp_net_interface_getname | ( | mUpnpNetworkInterface * | netIf | ) |
char * mupnp_net_interface_getnetmask | ( | mUpnpNetworkInterface * | netIf | ) |
mUpnpNetworkInterface * mupnp_net_interface_new | ( | void | ) |
void mupnp_net_interface_setaddress | ( | mUpnpNetworkInterface * | netIf, |
char * | ipaddr ) |
void mupnp_net_interface_setname | ( | mUpnpNetworkInterface * | netIf, |
char * | name ) |
void mupnp_net_interface_setnetmask | ( | mUpnpNetworkInterface * | netIf, |
char * | ipaddr ) |
void mupnp_net_interfacelist_delete | ( | mUpnpNetworkInterfaceList * | netIfList | ) |
mUpnpNetworkInterface * mupnp_net_interfacelist_get | ( | mUpnpNetworkInterfaceList * | netIfList, |
char * | name ) |
void mupnp_net_interfacelist_getchanges | ( | mUpnpNetworkInterfaceList * | netIfListOld, |
mUpnpNetworkInterfaceList * | netIfListNew, | ||
mUpnpNetworkInterfaceList * | netIfListAdded, | ||
mUpnpNetworkInterfaceList * | netIfListRemoved ) |
Gets changes in the two given (aka old and new) interface lists. Changes are resolved based on IP-addresses.
netIfListOld | List of the old interfaces. It is changed! |
netIfListNew | List of the new interfaces. It is changed! |
netIfListAdded | List to store interfaces, which were in netIfListNew, but were not in netIfListOld. May be NULL. |
netIfListRemoved | List to store interfaces, which were in netIfListOld, but were not in netIfListNew. |
mUpnpNetworkInterfaceList * mupnp_net_interfacelist_new | ( | void | ) |
bool mupnp_net_isipv6address | ( | const char * | addr | ) |
char * mupnp_net_selectaddr | ( | struct sockaddr * | remoteaddr | ) |