24
24
#include <stdlib.h> /* malloc(3) */
25
25
#include <unistd.h> /* getopt, read, write, ... */
27
/* Handle the case of building on MacOS X */
28
#if defined(__APPLE__)
28
33
#include <ib_defs.h> /* ib_mtu_t */
37
#include <infiniband/verbs.h> /* enum ibv_mtu */
74
83
int commtype; /* Communications type */
75
84
int comptype; /* Completion type */
87
enum ibv_mtu ib_mtu; /* MTU Size for Infiniband HCA */
88
int commtype; /* Communications type */
89
int comptype; /* Completion type */
90
char *device_and_port; /* Local port specification */
79
#if defined(INFINIBAND)
94
#if defined(INFINIBAND) || defined(OPENIB)
80
95
enum completion_types {
81
96
NP_COMP_LOCALPOLL, /* Poll locally on last byte of data */
82
97
NP_COMP_VAPIPOLL, /* Poll using vapi function */
110
#include <sys/socket.h>
111
#include <netinet/in.h>
112
#include <netinet/sctp.h>
113
#include <arpa/inet.h>
115
typedef struct protocolstruct ProtocolStruct;
116
struct protocolstruct
118
struct sockaddr_in6 sin1; /* socket structure #1 */
119
struct sockaddr_in6 sin2; /* socket structure #2 */
120
int nodelay; /* Flag for TCP nodelay */
121
struct hostent *addr; /* Address of host */
122
int sndbufsz; /* Size of TCP send buffer */
123
int rcvbufsz; /* Size of TCP receive buffer */
128
#include <sys/socket.h>
129
#include <netinet/in.h>
130
#include <netinet/sctp.h>
131
#include <arpa/inet.h>
133
typedef struct protocolstruct ProtocolStruct;
134
struct protocolstruct
136
struct sockaddr_in sin1, /* socket structure #1 */
137
sin2; /* socket structure #2 */
138
int nodelay; /* Flag for TCP nodelay */
139
struct hostent *addr; /* Address of host */
140
int sndbufsz, /* Size of TCP send buffer */
141
rcvbufsz; /* Size of TCP receive buffer */
146
#include <sys/socket.h>
147
#include <netinet/in.h>
148
#include <netinet/tcp.h>
149
#include <arpa/inet.h>
151
typedef struct protocolstruct ProtocolStruct;
152
struct protocolstruct
154
struct sockaddr_in6 sin1; /* socket structure #1 */
155
struct sockaddr_in6 sin2; /* socket structure #2 */
156
int nodelay; /* Flag for TCP nodelay */
157
struct hostent *addr; /* Address of host */
158
int sndbufsz; /* Size of TCP send buffer */
159
int rcvbufsz; /* Size of TCP receive buffer */
164
#include <sys/socket.h>
165
#include <netipx/ipx.h>
167
typedef struct protocolstruct ProtocolStruct;
168
struct protocolstruct
170
struct sockaddr_ipx sipx1; /* socket structure #1 */
171
struct sockaddr_ipx sipx2; /* socket structure #2 */
172
int sndbufsz; /* Size of send buffer */
173
int rcvbufsz; /* Size of receive buffer */
93
176
#elif defined(MPI)
94
177
typedef struct protocolstruct ProtocolStruct;
95
178
struct protocolstruct
201
#error "One of TCP, MPI, PVM, TCGMSG, LAPI, SHMEM, ATOLL, MEMCPY, DISK must be defined during compilation"
284
#error "One of TCP, TCP6, SCTP, SCTP6, IPX, MPI, PVM, TCGMSG, LAPI, SHMEM, ATOLL, MEMCPY, DISK must be defined during compilation"
235
318
int reset_conn; /* Reset connection flag */
236
319
int soffset,roffset;
237
320
int syncflag; /* flag for using sync sends vs. normal sends in MPI mod*/
321
int use_sdp; /* Use AF_INET_SDP instead of AF_INET */
239
322
/* Now we work with a union of information for protocol dependent stuff */
240
323
ProtocolStruct prot;