Loading...
Searching...
No Matches
inet.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013-15 Freie Universität Berlin
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
23#ifndef ARPA_INET_H
24#define ARPA_INET_H
25
26#include "net/af.h"
27#include "sys/bytes.h"
28#include "netinet/in.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
37#ifndef INADDRSZ
38#define INADDRSZ (4)
39#endif
40
44#ifndef IN6ADDRSZ
45#define IN6ADDRSZ (16)
46#endif
47
62const char *inet_ntop(int af, const void *__restrict src, char *__restrict dst,
63 socklen_t size);
64
79int inet_pton(int af, const char *src, void *dst);
80
81#ifdef __cplusplus
82}
83#endif
84
88#endif /* ARPA_INET_H */
Global UNIX address family definitions.
System-internal byte operations.
uint32_t socklen_t
socket address length
Definition bytes.h:36
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.