OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

btl_sctp_hdr.h
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18
19 #ifndef MCA_BTL_SCTP_HDR_H
20 #define MCA_BTL_SCTP_HDR_H
21
22
23 #include "ompi_config.h"
24 #include "ompi/mca/btl/base/base.h"
25 #include "btl_sctp.h"
26 #include "opal/types.h"
27
28 BEGIN_C_DECLS
29
30 /**
31 * SCTP header.
32 */
33
34 #define MCA_BTL_SCTP_HDR_TYPE_SEND 1
35 #define MCA_BTL_SCTP_HDR_TYPE_PUT 2
36 #define MCA_BTL_SCTP_HDR_TYPE_GET 3
37
38
39 struct mca_btl_sctp_hdr_t {
40 mca_btl_base_header_t base;
41 uint8_t type;
42 uint16_t count;
43 #if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
44 /* uint64_t may be required to be 8 byte aligned. */
45 uint8_t padding[4];
46 #endif
47 uint64_t size;
48 };
49 typedef struct mca_btl_sctp_hdr_t mca_btl_sctp_hdr_t;
50
51 #define MCA_BTL_SCTP_HDR_HTON(hdr) \
52 do { \
53 hdr.count = htons(hdr.count); \
54 hdr.size = hton64(hdr.size); \
55 } while (0)
56
57 #define MCA_BTL_SCTP_HDR_NTOH(hdr) \
58 do { \
59 hdr.count = ntohs(hdr.count); \
60 hdr.size = ntoh64(hdr.size); \
61 } while (0)
62
63 END_C_DECLS
64 #endif
mca_btl_base_header_t
Definition: btl.h:321
btl_sctp.h
mca_btl_sctp_hdr_t
Definition: btl_sctp_hdr.h:39
base.h