00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_ATM_PARAMS_H
00015 #define ACE_ATM_PARAMS_H
00016 #include "ace/pre.h"
00017
00018 #include "ace/config-all.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #if defined (ACE_HAS_ATM)
00025
00026 #include "ace/ACE_export.h"
00027
00028 #if defined (ACE_HAS_FORE_ATM_XTI)
00029 #include "ace/TLI.h"
00030 #define ATM_PROTOCOL_DEFAULT 0
00031 typedef struct t_info Param_Info;
00032 typedef struct netbuf Param_Udata;
00033 #elif defined (ACE_HAS_FORE_ATM_WS2)
00034 #include "ace/SOCK.h"
00035 #define ATM_PROTOCOL_DEFAULT ATMPROTO_AAL5
00036 #define ACE_XTI_ATM_DEVICE ""
00037 typedef int Param_Info;
00038 typedef int Param_Udata;
00039 #elif defined (ACE_HAS_LINUX_ATM)
00040 #include "atm.h"
00041 #define AF_ATM PF_ATMSVC
00042 #define ACE_XTI_ATM_DEVICE ""
00043 #define ATM_PROTOCOL_DEFAULT ATM_AAL5
00044 typedef int Param_Info;
00045 typedef int Param_Udata;
00046 #else
00047 #define ACE_XTI_ATM_DEVICE ""
00048 typedef int Param_Info;
00049 typedef int Param_Udata;
00050 #endif
00051
00052 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00053
00054
00055
00056
00057
00058
00059
00060 class ACE_Export ACE_ATM_Params
00061 {
00062 public:
00063
00064
00065
00066
00067
00068
00069
00070 ACE_ATM_Params (int rw_flag = 1,
00071 const char device[] = ACE_XTI_ATM_DEVICE,
00072 Param_Info *info = 0,
00073 Param_Udata *udata = 0,
00074 int oflag = O_RDWR,
00075 int protocol_family = AF_ATM,
00076 int protocol = ATM_PROTOCOL_DEFAULT,
00077 int type =
00078 #if defined (ACE_HAS_LINUX_ATM)
00079 SOCK_DGRAM,
00080 #else
00081 SOCK_RAW,
00082 #endif
00083 ACE_Protocol_Info *protocol_info = 0,
00084 ACE_SOCK_GROUP g = 0,
00085 u_long flags
00086 = ACE_FLAG_MULTIPOINT_C_ROOT
00087 | ACE_FLAG_MULTIPOINT_D_ROOT,
00088 int reuse_addr = 0);
00089
00090
00091 ~ACE_ATM_Params ();
00092
00093
00094 int get_protocol_family (void) const;
00095
00096
00097 void set_protocol_family (int);
00098
00099
00100 int get_protocol (void) const;
00101
00102
00103 void set_protocol (int);
00104
00105
00106 int get_type (void) const;
00107
00108
00109 void set_type (int);
00110
00111
00112 ACE_Protocol_Info *get_protocol_info( void );
00113
00114
00115 void set_protocol_info( ACE_Protocol_Info *);
00116
00117
00118 ACE_SOCK_GROUP get_sock_group( void );
00119
00120
00121 void set_sock_group( ACE_SOCK_GROUP );
00122
00123
00124 u_long get_flags( void );
00125
00126
00127 void set_flags( u_long );
00128
00129
00130 int get_reuse_addr (void) const;
00131
00132
00133 void set_reuse_addr (int);
00134
00135
00136 const char* get_device (void) const;
00137
00138
00139 Param_Info* get_info (void) const;
00140
00141
00142 void set_info (Param_Info *);
00143
00144
00145 int get_rw_flag (void) const;
00146
00147
00148 void set_rw_flag (int);
00149
00150
00151 Param_Udata* get_user_data (void) const;
00152
00153
00154 void set_user_data (Param_Udata*);
00155
00156
00157 int get_oflag (void) const;
00158
00159
00160 void set_oflag (int);
00161
00162
00163 void dump (void) const;
00164
00165
00166 ACE_ALLOC_HOOK_DECLARE;
00167
00168 private:
00169
00170 int protocol_family_;
00171
00172
00173 int protocol_;
00174
00175
00176 int type_;
00177
00178
00179 ACE_Protocol_Info *protocol_info_;
00180
00181
00182 ACE_SOCK_GROUP group_;
00183
00184
00185 u_long flags_;
00186
00187
00188 int reuse_addr_;
00189
00190
00191 const char *device_;
00192
00193
00194 Param_Info *info_;
00195
00196
00197 int rw_flag_;
00198
00199
00200 Param_Udata *udata_;
00201
00202
00203 int oflag_;
00204 };
00205
00206 ACE_END_VERSIONED_NAMESPACE_DECL
00207
00208 #if defined (__ACE_INLINE__)
00209 #include "ace/ATM_Params.inl"
00210 #endif
00211
00212 #endif
00213 #include "ace/post.h"
00214 #endif