OpenMPI
0.1.1
|
Contains the data structure which describes each connection. More...
#include "orte_config.h"
#include "orte/types.h"
#include <string.h>
#include "opal/class/opal_list.h"
#include "opal/threads/mutex.h"
#include "opal/mca/event/event.h"
#include "oob_tcp_msg.h"
#include "oob_tcp_addr.h"
Go to the source code of this file.
Data Structures | |
struct | mca_oob_tcp_peer_t |
This structure describes a peer. More... | |
Macros | |
#define | MCA_OOB_TCP_PEER_ALLOC(peer, rc) |
Get a new peer data structure. More... | |
#define | MCA_OOB_TCP_PEER_RETURN(peer) |
Return a peer data structure. More... | |
Typedefs | |
typedef struct mca_oob_tcp_peer_t | mca_oob_tcp_peer_t |
Convenience Typedef. | |
Enumerations | |
enum | mca_oob_tcp_state_t { MCA_OOB_TCP_CLOSED, MCA_OOB_TCP_RESOLVE, MCA_OOB_TCP_CONNECTING, MCA_OOB_TCP_CONNECT_ACK, MCA_OOB_TCP_CONNECTED, MCA_OOB_TCP_FAILED } |
the state of the connection | |
Functions | |
OBJ_CLASS_DECLARATION (mca_oob_tcp_peer_t) | |
mca_oob_tcp_peer_t * | mca_oob_tcp_peer_lookup (const orte_process_name_t *peer_name) |
Lookup a peer in the cache - if it doesn't exists create one and cache it. More... | |
int | mca_oob_tcp_peer_send (mca_oob_tcp_peer_t *peer, mca_oob_tcp_msg_t *msg) |
Start sending a message to the specified peer. More... | |
bool | mca_oob_tcp_peer_accept (mca_oob_tcp_peer_t *peer, int sd) |
Connection request for this peer. More... | |
void | mca_oob_tcp_peer_close (mca_oob_tcp_peer_t *peer) |
Cleanup/close the connection to the peer. More... | |
void | mca_oob_tcp_peer_shutdown (mca_oob_tcp_peer_t *peer) |
void | mca_oob_tcp_peer_resolved (mca_oob_tcp_peer_t *peer, mca_oob_tcp_addr_t *addr) |
The peers address has been resolved. | |
int | mca_oob_tcp_peer_send_ident (mca_oob_tcp_peer_t *peer) |
void | mca_oob_tcp_peer_dequeue_msg (mca_oob_tcp_peer_t *peer, mca_oob_tcp_msg_t *msg) |
void | mca_oob_tcp_peer_dump (mca_oob_tcp_peer_t *peer, const char *msg) |
Contains the data structure which describes each connection.
#define MCA_OOB_TCP_PEER_ALLOC | ( | peer, | |
rc | |||
) |
Get a new peer data structure.
Referenced by mca_oob_tcp_peer_lookup().
#define MCA_OOB_TCP_PEER_RETURN | ( | peer | ) |
Return a peer data structure.
Referenced by mca_oob_tcp_fini(), and mca_oob_tcp_peer_lookup().
bool mca_oob_tcp_peer_accept | ( | mca_oob_tcp_peer_t * | peer, |
int | sd | ||
) |
Connection request for this peer.
Check the status of our connection before accepting the peers.
peer | The peer process. |
sd | Incoming connection request. |
References mca_oob_tcp_peer_close(), opal_output(), OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, ORTE_PROC_MY_NAME, mca_oob_tcp_peer_t::peer_lock, mca_oob_tcp_peer_t::peer_name, mca_oob_tcp_peer_t::peer_recv_event, mca_oob_tcp_peer_t::peer_sd, mca_oob_tcp_peer_t::peer_state, and mca_oob_tcp_component_t::tcp_debug.
void mca_oob_tcp_peer_close | ( | mca_oob_tcp_peer_t * | peer | ) |
Cleanup/close the connection to the peer.
peer | The peer process. |
References orte_process_name_t::jobid, opal_output(), OPAL_OUTPUT_VERBOSE, OPAL_THREAD_UNLOCK, ORTE_PROC_MY_NAME, mca_oob_tcp_peer_t::peer_lock, mca_oob_tcp_peer_t::peer_name, mca_oob_tcp_peer_t::peer_sd, mca_oob_tcp_peer_t::peer_state, mca_oob_tcp_component_t::tcp_debug, and orte_errmgr_base_module_2_3_0_t::update_state.
Referenced by mca_oob_tcp_msg_recv_handler(), mca_oob_tcp_msg_send_handler(), and mca_oob_tcp_peer_accept().
mca_oob_tcp_peer_t* mca_oob_tcp_peer_lookup | ( | const orte_process_name_t * | peer_name | ) |
Lookup a peer in the cache - if it doesn't exists create one and cache it.
peer_name | the name of the peer |
pointer | to the peer's (possibly newly created) struture |
NULL | if there was a problem |
References MCA_OOB_TCP_PEER_ALLOC, MCA_OOB_TCP_PEER_RETURN, opal_hash_table_get_value_uint64(), opal_hash_table_set_value_uint64(), opal_list_get_begin(), opal_list_get_last(), opal_list_get_prev, opal_list_get_size(), opal_list_prepend(), opal_list_remove_item(), OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, orte_util_hash_name(), mca_oob_tcp_peer_t::peer_addr, mca_oob_tcp_peer_t::peer_current_af, mca_oob_tcp_peer_t::peer_name, mca_oob_tcp_peer_t::peer_recv_msg, mca_oob_tcp_peer_t::peer_retries, mca_oob_tcp_peer_t::peer_sd, mca_oob_tcp_peer_t::peer_send_msg, mca_oob_tcp_peer_t::peer_state, mca_oob_tcp_component_t::tcp_lock, mca_oob_tcp_component_t::tcp_peer_limit, mca_oob_tcp_component_t::tcp_peer_list, and mca_oob_tcp_component_t::tcp_peers.
int mca_oob_tcp_peer_send | ( | mca_oob_tcp_peer_t * | peer, |
mca_oob_tcp_msg_t * | msg | ||
) |
Start sending a message to the specified peer.
The routine can return before the send completes.
peer | The peer process. |
msg | The message to send. |
ORTE_SUCCESS | or error code on failure. |
References mca_oob_tcp_msg_complete(), mca_oob_tcp_msg_send_handler(), mca_oob_tcp_resolve(), opal_list_append, OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, mca_oob_tcp_peer_t::peer_lock, mca_oob_tcp_peer_t::peer_name, mca_oob_tcp_peer_t::peer_send_event, mca_oob_tcp_peer_t::peer_send_msg, mca_oob_tcp_peer_t::peer_send_queue, and mca_oob_tcp_peer_t::peer_state.