1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/include/inet_ntop.h

62 lines
1.6 KiB
C
Raw Normal View History

/*
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef INET_NTOP_H_
#define INET_NTOP_H_
#include <stdlib.h>
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
extern "C" {
#endif
#ifndef AF_INET
#define AF_INET 2 ///< internetwork address family: UDP, TCP, etc.
#endif
#ifndef AF_INET6
/**
* IPv6 address family.
*
* @see AF_INET
*/
#define AF_INET6 28
#endif
#ifndef IN6ADDRSZ
#define IN6ADDRSZ 16
#endif
#ifndef INT16SZ
2013-01-12 21:51:43 +01:00
#define INT16SZ sizeof(int16_t)
#endif
#if !defined(EAFNOSUPPORT) && defined(WSAEAFNOSUPPORT)
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
/*
* WARNING: Don't even consider trying to compile this on a system where
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
*/
2013-06-22 17:58:19 +02:00
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
2014-10-10 11:51:11 +02:00
#ifdef __cplusplus
}
#endif
#endif /* INET_NTOP_H_ */