~ubuntu-branches/ubuntu/trusty/netpipe/trusty

« back to all changes in this revision

Viewing changes to src/netpipe.h

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2010-01-06 19:07:32 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100106190732-fg9urgk31weolrcs
Tags: 3.7.1-1
* New upstream release
* Bug fix: "debian/watch fails to report upstream's version", thanks
  to Raphael Geissert (Closes: #450010).

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <stdlib.h>         /* malloc(3) */
25
25
#include <unistd.h>         /* getopt, read, write, ... */
26
26
 
 
27
/* Handle the case of building on MacOS X */
 
28
#if defined(__APPLE__)
 
29
#include <stdint.h>
 
30
#endif 
 
31
 
27
32
#ifdef INFINIBAND
28
33
#include <ib_defs.h> /* ib_mtu_t */
29
34
#endif
30
35
 
 
36
#ifdef OPENIB
 
37
#include <infiniband/verbs.h>   /* enum ibv_mtu */
 
38
#endif
 
39
 
31
40
#ifdef FINAL
32
41
  #define  TRIALS             7
33
42
  #define  RUNTM              0.25
74
83
      int                     commtype; /* Communications type            */
75
84
      int                     comptype; /* Completion type                */
76
85
#endif
 
86
#if defined(OPENIB)
 
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 */
 
91
#endif
77
92
  };
78
93
 
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              */
90
105
};
91
106
#endif
92
107
 
 
108
#elif defined(SCTP6)
 
109
  #include <netdb.h>
 
110
  #include <sys/socket.h>
 
111
  #include <netinet/in.h>
 
112
  #include <netinet/sctp.h>
 
113
  #include <arpa/inet.h>
 
114
  
 
115
  typedef struct protocolstruct ProtocolStruct;
 
116
  struct protocolstruct
 
117
  {
 
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     */
 
124
  };
 
125
 
 
126
#elif defined(SCTP)
 
127
  #include <netdb.h>
 
128
  #include <sys/socket.h>
 
129
  #include <netinet/in.h>
 
130
  #include <netinet/sctp.h>
 
131
  #include <arpa/inet.h>
 
132
  
 
133
  typedef struct protocolstruct ProtocolStruct;
 
134
  struct protocolstruct
 
135
  {
 
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     */
 
142
  };
 
143
 
 
144
#elif defined(TCP6)
 
145
  #include <netdb.h>
 
146
  #include <sys/socket.h>
 
147
  #include <netinet/in.h>
 
148
  #include <netinet/tcp.h>
 
149
  #include <arpa/inet.h>
 
150
  
 
151
  typedef struct protocolstruct ProtocolStruct;
 
152
  struct protocolstruct
 
153
  {
 
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     */
 
160
  };
 
161
 
 
162
#elif defined(IPX)
 
163
  #include <netdb.h>
 
164
  #include <sys/socket.h>
 
165
  #include <netipx/ipx.h>
 
166
  
 
167
  typedef struct protocolstruct ProtocolStruct;
 
168
  struct protocolstruct
 
169
  {
 
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     */
 
174
  };
 
175
 
93
176
#elif defined(MPI)
94
177
  typedef struct protocolstruct ProtocolStruct;
95
178
  struct protocolstruct 
198
281
  };
199
282
 
200
283
#else
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"
202
285
 
203
286
#endif
204
287
 
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*/
238
 
 
 
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;
241
324
};