Merge pull request #663 from authmillenon/rm-addr-conv-dep

Remove destiny header dependency from net_help
dev/timer
Oleg Hahm 10 years ago
commit 0e734f5c38

@ -18,8 +18,6 @@
#include <string.h>
#include <stdint.h>
#include "destiny/socket.h"
#include "inet_ntop.h"
/* const char *

@ -18,8 +18,6 @@
#include <string.h>
#include <stdint.h>
#include "destiny/socket.h"
#include "inet_pton.h"
/* int

@ -41,7 +41,9 @@ typedef uint32_t socklen_t; ///< POSIX compatible type for address length.
#define AF_UNSPEC 0 ///< unspecified address family.
#define AF_LOCAL 1 ///< local to host (pipes, portals) address family.
#define AF_UNIX AF_LOCAL ///< alias for AF_LOCAL for backward compatibility.
#ifndef AF_INET
#define AF_INET 2 ///< internetwork address family: UDP, TCP, etc.
#endif
#define AF_IMPLINK 3 ///< ARPAnet IMP address family.
#define AF_PUP 4 ///< PUP protocols address family: e.g. BSP
#define AF_CHAOS 5 ///< MIT CHAOS protocols address family
@ -69,12 +71,14 @@ typedef uint32_t socklen_t; ///< POSIX compatible type for address length.
#define AF_ISDN 26 ///< Integrated Services Digital Network address family
#define AF_E164 AF_ISDN ///< CCITT E.164 recommendation
#define pseudo_AF_KEY 27 ///< Internal key-management function (no AF)
#ifndef AF_INET6
/**
* IPv6 address family.
*
* @see AF_INET
*/
#define AF_INET6 28
#endif
#define AF_NATM 29 ///< native ATM access address family
#define AF_ATM 30 ///< ATM address family
#define pseudo_AF_HDRCMPLT 31 ///< Used by BPF to not rewrite headers in interface output routine

@ -1,5 +1,18 @@
#ifndef INET_NTOP_H_
#define INET_NTOP_H_
#include <stdlib.h>
#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

@ -1,5 +1,18 @@
#ifndef INET_PTON_H_
#define INET_PTON_H_
#include <stdlib.h>
#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

Loading…
Cancel
Save