Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 ML!PA Consulting GmbH
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
23
24#include <stdint.h>
25#include <stddef.h>
26
27#include "net/ipv4/addr.h"
28#include "net/ipv6/addr.h"
29#include "net/netif.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
45int netutils_get_ipv4(ipv4_addr_t *addr, const char *hostname);
46
58int netutils_get_ipv6(ipv6_addr_t *addr, netif_t **netif, const char *hostname);
59
60#ifdef __cplusplus
61}
62#endif
63
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:71
Data type to represent an IPv4 address.
Definition addr.h:53
Data type to represent an IPv6 address.
Definition addr.h:67