utils.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 ML!PA Consulting GmbH
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
21 #include <stdint.h>
22 #include <stddef.h>
23 
24 #include "net/ipv4/addr.h"
25 #include "net/ipv6/addr.h"
26 #include "net/netif.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
42 int netutils_get_ipv4(ipv4_addr_t *addr, const char *hostname);
43 
55 int netutils_get_ipv6(ipv6_addr_t *addr, netif_t **netif, const char *hostname);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
int netutils_get_ipv6(ipv6_addr_t *addr, netif_t **netif, const char *hostname)
Parse an IPv6 address / hostname string.
int netutils_get_ipv4(ipv4_addr_t *addr, const char *hostname)
Parse an IPv4 address / hostname string.
IPv4 address type and helper functions definitions.
Definitions for IPv6 addresses.
Common network interface API definitions.
Network interface descriptor.
Definition: netif.h:68
Data type to represent an IPv4 address.
Definition: addr.h:55
Data type to represent an IPv6 address.
Definition: addr.h:64