OpenMPI  0.1.1
oob_tcp_addr.h
Go to the documentation of this file.
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-2006 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
13  * $COPYRIGHT$
14  *
15  * Additional copyrights may follow
16  *
17  * $HEADER$
18  */
19 /** @file:
20  *
21  * Contains header used by tcp oob.
22  */
23 
24 #ifndef _MCA_OOB_TCP_ADDR_H_
25 #define _MCA_OOB_TCP_ADDR_H_
26 
27 #include "orte_config.h"
28 #include "orte/types.h"
29 
30 #ifdef HAVE_SYS_TYPES_H
31 #include <sys/types.h>
32 #endif
33 #ifdef HAVE_SYS_SOCKET_H
34 #include <sys/socket.h>
35 #endif
36 #ifdef HAVE_NETINET_IN_H
37 #include <netinet/in.h>
38 #endif
39 
40 #include "opal/class/opal_object.h"
41 
42 
43 BEGIN_C_DECLS
44 
45 #define MCA_OOB_TCP_ADDR_UNCLASSIFIED 0 /* we don't know anything */
46 #define MCA_OOB_TCP_ADDR_MATCHED 1 /* peer has IP on the same LAN */
47 #define MCA_OOB_TCP_ADDR_IPV6 2 /* peer has an IPv6 address */
48 #define MCA_OOB_TCP_ADDR_IPV4public 4 /* peer has public IPv4 address */
49 
50 #define MCA_OOB_TCP_ADDR_TYPE_AFINET 0x01
51 #define MCA_OOB_TCP_ADDR_TYPE_AFINET6 0x02
52 
53 /**
54  * Address info published to registry
55  */
57  opal_object_t super;
58  orte_process_name_t addr_name;
59  orte_std_cntr_t addr_count;
60  orte_std_cntr_t addr_next;
61  orte_std_cntr_t addr_alloc;
62  orte_std_cntr_t addr_matched;/* status of already tried address classes */
63  struct sockaddr_storage *addr_inet; /* yes, we want storage here, so the indexes work out... */
64 };
66 
68 
69 /**
70  *
71  */
72 
73 int mca_oob_tcp_addr_insert(mca_oob_tcp_addr_t*, const struct sockaddr*);
74 
75 /**
76  *
77  */
78 
79 int mca_oob_tcp_addr_get_next(mca_oob_tcp_addr_t*, struct sockaddr*);
80 
81 END_C_DECLS
82 
83 #endif
84 
Definition: types.h:146
int32_t orte_std_cntr_t
Supported datatypes for messaging and storage operations.
Definition: types.h:34
Address info published to registry.
Definition: oob_tcp_addr.h:56
Definition: util-internal.h:214
Base object.
Definition: opal_object.h:182
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236