Skip to content

Commit

Permalink
Remove destiny header dependency from net_help
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Feb 7, 2014
1 parent 3ba1568 commit e5df49d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 0 additions & 2 deletions sys/net/crosslayer/net_help/inet_ntop.c
Expand Up @@ -18,8 +18,6 @@
#include <string.h>
#include <stdint.h>

#include "destiny/socket.h"

#include "inet_ntop.h"

/* const char *
Expand Down
2 changes: 0 additions & 2 deletions sys/net/crosslayer/net_help/inet_pton.c
Expand Up @@ -18,8 +18,6 @@
#include <string.h>
#include <stdint.h>

#include "destiny/socket.h"

#include "inet_pton.h"

/* int
Expand Down
4 changes: 4 additions & 0 deletions sys/net/include/destiny/socket.h
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions sys/net/include/inet_ntop.h
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions sys/net/include/inet_pton.h
@@ -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
Expand Down

0 comments on commit e5df49d

Please sign in to comment.