aboutsummaryrefslogtreecommitdiff
path: root/externals/ace/os_include/net
diff options
context:
space:
mode:
authorRat <none@none>2010-06-07 19:10:55 +0200
committerRat <none@none>2010-06-07 19:10:55 +0200
commit32546e22828e793e3881e1055acb72b6a044e331 (patch)
tree759706cdfe8423887c69a2f8ed651c0c1e5ab7d7 /externals/ace/os_include/net
parent2e0f8fb6e558088b33bdee83bc5ff20014e983b3 (diff)
added ace + vcproj for win
--HG-- branch : trunk
Diffstat (limited to 'externals/ace/os_include/net')
-rw-r--r--externals/ace/os_include/net/os_if.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/externals/ace/os_include/net/os_if.h b/externals/ace/os_include/net/os_if.h
new file mode 100644
index 00000000000..3dcf5918f8c
--- /dev/null
+++ b/externals/ace/os_include/net/os_if.h
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file os_if.h
+ *
+ * sockets local interfaces
+ *
+ * $Id: os_if.h 88719 2010-01-26 12:55:03Z sowayaa $
+ *
+ * @author Don Hinton <dhinton@dresystems.com>
+ * @author This code was originally in various places including ace/OS.h.
+ */
+//=============================================================================
+
+#ifndef ACE_OS_INCLUDE_NET_OS_IF_H
+#define ACE_OS_INCLUDE_NET_OS_IF_H
+
+#include /**/ "ace/pre.h"
+
+#include /**/ "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if !defined (ACE_LACKS_NET_IF_H)
+# include /**/ <net/if.h>
+# if defined (ACE_HAS_NET_IF_DL_H)
+# include /**/ <net/if_dl.h>
+# endif /* ACE_HAS_NET_IF_DL_H */
+# if defined (HPUX) && defined (IOR)
+ /* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h
+ and we don't want that definition. See IOP_IORC.h.
+ Thanks to Torsten Kopper <tkue_0931@fastmail.fm> for this patch.*/
+# undef IOR
+# endif /* HPUX && IOR */
+#endif /* !ACE_LACKS_NET_IF_H */
+
+#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+# include /**/ <ws2tcpip.h>
+#endif /* ACE_HAS_WINSOCK2 */
+
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_HAS_BROKEN_IF_HEADER)
+ struct ifafilt;
+#endif /* ACE_HAS_BROKEN_IF_HEADER */
+
+#if defined (ACE_LACKS_IFREQ)
+struct ifreq {
+#define IFNAMSIZ 16
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ short ifru_flags;
+ int ifru_metric;
+ int ifru_mtu;
+ int ifru_phys;
+ int ifru_media;
+ caddr_t ifru_data;
+ int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
+ } ifr_ifru;
+#define ifr_addr ifr_ifru.ifru_addr /* address */
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+#define ifr_flags ifr_ifru.ifru_flags /* flags */
+#define ifr_metric ifr_ifru.ifru_metric /* metric */
+#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
+#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
+#define ifr_media ifr_ifru.ifru_media /* physical media */
+#define ifr_data ifr_ifru.ifru_data /* for use by interface */
+#define ifr_tap ifr_ifru.ifru_tap /* tap function */
+};
+#endif /* ACE_LACKS_IFREQ */
+
+#if defined (ACE_LACKS_IFCONF)
+struct ifconf {
+ int ifc_len;
+ union {
+ caddr_t ifcu_buf;
+ struct ifreq *ifcu_req;
+ } ifc_ifcu;
+#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
+#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
+ };
+#endif /* ACE_LACKS_IFCONF */
+
+#if !defined (IFF_UP)
+# define IFF_UP 0x1
+#endif /* IFF_UP */
+
+#if !defined (IFF_LOOPBACK)
+# define IFF_LOOPBACK 0x8
+#endif /* IFF_LOOPBACK */
+
+#if !defined (IFF_BROADCAST)
+# define IFF_BROADCAST 0x2
+#endif /* IFF_BROADCAST */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#include /**/ "ace/post.h"
+#endif /* ACE_OS_INCLUDE_NET_OS_IF_H */