Loading...
Searching...
No Matches
inet.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2013-2015 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
12
22
23#include "net/af.h"
24#include "sys/bytes.h"
25#include "netinet/in.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34#ifndef INADDRSZ
35#define INADDRSZ (4)
36#endif
37
41#ifndef IN6ADDRSZ
42#define IN6ADDRSZ (16)
43#endif
44
59const char *inet_ntop(int af, const void *__restrict src, char *__restrict dst,
60 socklen_t size);
61
76int inet_pton(int af, const char *src, void *dst);
77
78#ifdef __cplusplus
79}
80#endif
81
Global UNIX address family definitions.
System-internal byte operations.
uint32_t socklen_t
socket address length
Definition bytes.h:33
const char * inet_ntop(int af, const void *__restrict src, char *__restrict dst, socklen_t size)
Converts an IP address to its string representation.
int inet_pton(int af, const char *src, void *dst)
Converts an IP address string representation to a byte-represented IP address.
Main socket header.