00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ACE_OS_INCLUDE_NET_OS_IF_H
00017 #define ACE_OS_INCLUDE_NET_OS_IF_H
00018
00019 #include "ace/pre.h"
00020
00021 #include "ace/config-all.h"
00022
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif
00026
00027 #if !defined (ACE_LACKS_NET_IF_H)
00028
00029
00030 # if defined (ACE_HAS_STL_MAP_CONFLICT)
00031 # define map _Resource_Allocation_Map_
00032 # endif
00033 extern "C" {
00034 # include <net/if.h>
00035 }
00036 # if defined (ACE_HAS_STL_MAP_CONFLICT)
00037 # undef map
00038 # endif
00039 # if defined (HPUX) && defined (IOR)
00040
00041
00042
00043 # undef IOR
00044 # endif
00045 #endif
00046
00047 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00048 # include <ws2tcpip.h>
00049 #endif
00050
00051
00052 #ifdef __cplusplus
00053 extern "C"
00054 {
00055 #endif
00056
00057 #if defined (ACE_HAS_BROKEN_IF_HEADER)
00058 struct ifafilt;
00059 #endif
00060
00061 #if defined (ACE_LACKS_IFREQ)
00062 struct ifreq {
00063 #define IFNAMSIZ 16
00064 char ifr_name[IFNAMSIZ];
00065 union {
00066 struct sockaddr ifru_addr;
00067 struct sockaddr ifru_dstaddr;
00068 struct sockaddr ifru_broadaddr;
00069 short ifru_flags;
00070 int ifru_metric;
00071 int ifru_mtu;
00072 int ifru_phys;
00073 int ifru_media;
00074 caddr_t ifru_data;
00075 int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
00076 } ifr_ifru;
00077 #define ifr_addr ifr_ifru.ifru_addr
00078 #define ifr_dstaddr ifr_ifru.ifru_dstaddr
00079 #define ifr_broadaddr ifr_ifru.ifru_broadaddr
00080 #define ifr_flags ifr_ifru.ifru_flags
00081 #define ifr_metric ifr_ifru.ifru_metric
00082 #define ifr_mtu ifr_ifru.ifru_mtu
00083 #define ifr_phys ifr_ifru.ifru_phys
00084 #define ifr_media ifr_ifru.ifru_media
00085 #define ifr_data ifr_ifru.ifru_data
00086 #define ifr_tap ifr_ifru.ifru_tap
00087 };
00088 #endif
00089
00090 #if defined (ACE_LACKS_IFCONF)
00091 struct ifconf {
00092 int ifc_len;
00093 union {
00094 caddr_t ifcu_buf;
00095 struct ifreq *ifcu_req;
00096 } ifc_ifcu;
00097 #define ifc_buf ifc_ifcu.ifcu_buf
00098 #define ifc_req ifc_ifcu.ifcu_req
00099 };
00100 #endif
00101
00102 #if !defined (IFF_UP)
00103 # define IFF_UP 0x1
00104 #endif
00105
00106 #if !defined (IFF_LOOPBACK)
00107 # define IFF_LOOPBACK 0x8
00108 #endif
00109
00110 #if !defined (IFF_BROADCAST)
00111 # define IFF_BROADCAST 0x2
00112 #endif
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #include "ace/post.h"
00119 #endif