192 |
|
* Data member wrappers |
193 |
|
*/ |
194 |
|
|
195 |
+ |
// Forward declarations |
196 |
+ |
struct datab; |
197 |
+ |
struct msgb; |
198 |
+ |
struct queue; |
199 |
+ |
struct multicast_node; |
200 |
+ |
struct DLPIStream; |
201 |
+ |
|
202 |
+ |
// Optimize for 32-bit big endian targets |
203 |
+ |
#if defined(WORDS_BIGENDIAN) && (SIZEOF_VOID_P == 4) |
204 |
+ |
|
205 |
+ |
// Predefined member types |
206 |
+ |
typedef int8 nw_int8; |
207 |
+ |
typedef int16 nw_int16; |
208 |
+ |
typedef int32 nw_int32; |
209 |
+ |
typedef uint8 nw_uint8; |
210 |
+ |
typedef uint16 nw_uint16; |
211 |
+ |
typedef uint32 nw_uint32; |
212 |
+ |
typedef bool nw_bool; |
213 |
+ |
typedef uint8 * nw_uint8_p; |
214 |
+ |
typedef void * nw_void_p; |
215 |
+ |
typedef datab * nw_datab_p; |
216 |
+ |
typedef msgb * nw_msgb_p; |
217 |
+ |
typedef queue * nw_queue_p; |
218 |
+ |
typedef multicast_node *nw_multicast_node_p; |
219 |
+ |
typedef DLPIStream * nw_DLPIStream_p; |
220 |
+ |
|
221 |
+ |
#else |
222 |
+ |
|
223 |
|
// Big-endian memory accessor |
224 |
|
template< int nbytes > |
225 |
|
struct nw_memory_helper; |
285 |
|
typedef nw_scalar_member_helper<int, bool> nw_bool; |
286 |
|
typedef nw_scalar_member_helper<uint32, uint8 *> nw_uint8_p; |
287 |
|
typedef nw_scalar_member_helper<uint32, void *> nw_void_p; |
260 |
– |
|
261 |
– |
struct datab; |
288 |
|
typedef nw_scalar_member_helper<uint32, datab *> nw_datab_p; |
263 |
– |
|
264 |
– |
struct msgb; |
289 |
|
typedef nw_scalar_member_helper<uint32, msgb *> nw_msgb_p; |
266 |
– |
|
267 |
– |
struct queue; |
290 |
|
typedef nw_scalar_member_helper<uint32, queue *> nw_queue_p; |
269 |
– |
|
270 |
– |
struct multicast_node; |
291 |
|
typedef nw_scalar_member_helper<uint32, multicast_node *> nw_multicast_node_p; |
272 |
– |
|
273 |
– |
struct DLPIStream; |
292 |
|
typedef nw_scalar_member_helper<uint32, DLPIStream *> nw_DLPIStream_p; |
293 |
|
|
294 |
+ |
#endif |
295 |
+ |
|
296 |
|
|
297 |
|
/* |
298 |
|
* Structures |