Loading...
Searching...
No Matches
Network helper functions

Common network helper functions. More...

Detailed Description

Common network helper functions.

Files

file  utils.h
 Common network interface API definitions.
 

Functions

int netutils_get_ipv4 (ipv4_addr_t *addr, const char *hostname)
 Parse an IPv4 address / hostname string.
 
int netutils_get_ipv6 (ipv6_addr_t *addr, netif_t **netif, const char *hostname)
 Parse an IPv6 address / hostname string.
 

Function Documentation

◆ netutils_get_ipv4()

int netutils_get_ipv4 ( ipv4_addr_t addr,
const char *  hostname 
)

Parse an IPv4 address / hostname string.

If the DNS sock API module is used, this will attempt to resolve hostnames via DNS to IPv4 addresses.

Parameters
[out]addrIPv4 address of the host
[in]hostnameIPv4 address string or hostname
Returns
0 on success, error otherwise

◆ netutils_get_ipv6()

int netutils_get_ipv6 ( ipv6_addr_t addr,
netif_t **  netif,
const char *  hostname 
)

Parse an IPv6 address / hostname string.

If the DNS sock API module is used, this will attempt to resolve hostnames via DNS to IPv6 addresses.

Parameters
[out]addrIPv6 address of the host
[out]netifInterface if address is link-local
[in]hostnameIPv6 address string or hostname
Returns
0 on success, error otherwise