Monero
Loading...
Searching...
No Matches
upnputils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SA_LEN(sa)

Functions

int sockaddr_to_string (const struct sockaddr *addr, char *str, size_t size)
int set_non_blocking (int fd)
struct lan_addr_sget_lan_for_peer (const struct sockaddr *peer)
int upnp_gettimeofday (struct timeval *tv)

Macro Definition Documentation

◆ SA_LEN

#define SA_LEN ( sa)
Value:
((sa)->sa_len)

define portability macros

Function Documentation

◆ get_lan_for_peer()

struct lan_addr_s * get_lan_for_peer ( const struct sockaddr * peer)

get the LAN which the peer belongs to

◆ set_non_blocking()

int set_non_blocking ( int fd)

set the file description as non blocking return 0 in case of failure, 1 in case of success

◆ sockaddr_to_string()

int sockaddr_to_string ( const struct sockaddr * addr,
char * str,
size_t size )

convert a struct sockaddr to a human readable string. [ipv6]:port or ipv4:port return the number of characters used (as snprintf)

◆ upnp_gettimeofday()

int upnp_gettimeofday ( struct timeval * tv)

get the time for upnp Similar to a monotonic gettimeofday(tv, NULL)