Go to the documentation of this file.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 # include <net/if.h>
00029 # if defined (ACE_HAS_NET_IF_DL_H)
00030 # include <net/if_dl.h>
00031 # endif
00032 # if defined (HPUX) && defined (IOR)
00033
00034
00035
00036 # undef IOR
00037 # endif
00038 #endif
00039
00040 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00041 # include <ws2tcpip.h>
00042 #endif
00043
00044
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049
00050 #if defined (ACE_HAS_BROKEN_IF_HEADER)
00051 struct ifafilt;
00052 #endif
00053
00054 #if defined (ACE_LACKS_IFREQ)
00055 struct ifreq {
00056 #define IFNAMSIZ 16
00057 char ifr_name[IFNAMSIZ];
00058 union {
00059 struct sockaddr ifru_addr;
00060 struct sockaddr ifru_dstaddr;
00061 struct sockaddr ifru_broadaddr;
00062 short ifru_flags;
00063 int ifru_metric;
00064 int ifru_mtu;
00065 int ifru_phys;
00066 int ifru_media;
00067 caddr_t ifru_data;
00068 int (*ifru_tap)(struct ifnet *, struct ether_header *, struct mbuf *);
00069 } ifr_ifru;
00070 #define ifr_addr ifr_ifru.ifru_addr
00071 #define ifr_dstaddr ifr_ifru.ifru_dstaddr
00072 #define ifr_broadaddr ifr_ifru.ifru_broadaddr
00073 #define ifr_flags ifr_ifru.ifru_flags
00074 #define ifr_metric ifr_ifru.ifru_metric
00075 #define ifr_mtu ifr_ifru.ifru_mtu
00076 #define ifr_phys ifr_ifru.ifru_phys
00077 #define ifr_media ifr_ifru.ifru_media
00078 #define ifr_data ifr_ifru.ifru_data
00079 #define ifr_tap ifr_ifru.ifru_tap
00080 };
00081 #endif
00082
00083 #if defined (ACE_LACKS_IFCONF)
00084 struct ifconf {
00085 int ifc_len;
00086 union {
00087 caddr_t ifcu_buf;
00088 struct ifreq *ifcu_req;
00089 } ifc_ifcu;
00090 #define ifc_buf ifc_ifcu.ifcu_buf
00091 #define ifc_req ifc_ifcu.ifcu_req
00092 };
00093 #endif
00094
00095 #if !defined (IFF_UP)
00096 # define IFF_UP 0x1
00097 #endif
00098
00099 #if !defined (IFF_LOOPBACK)
00100 # define IFF_LOOPBACK 0x8
00101 #endif
00102
00103 #if !defined (IFF_BROADCAST)
00104 # define IFF_BROADCAST 0x2
00105 #endif
00106
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110
00111 #include "ace/post.h"
00112 #endif