2004-09-02 18:20:13 +04:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-09-02 18:20:13 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* Contains header used by tcp oob.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MCA_OOB_TCP_ADDR_H_
|
|
|
|
#define _MCA_OOB_TCP_ADDR_H_
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
2004-10-22 20:06:05 +04:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-09-02 18:20:13 +04:00
|
|
|
#include <sys/types.h>
|
2004-10-22 20:06:05 +04:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
2004-09-02 18:20:13 +04:00
|
|
|
#include <netinet/in.h>
|
2004-10-22 20:06:05 +04:00
|
|
|
#endif
|
2005-05-01 04:54:12 +04:00
|
|
|
#include "dps/dps.h"
|
2005-07-03 20:06:07 +04:00
|
|
|
#include "opal/class/opal_object.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "mca/ns/ns_types.h"
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-09-02 18:20:13 +04:00
|
|
|
/**
|
|
|
|
* Address info published to registry
|
|
|
|
*/
|
|
|
|
struct mca_oob_tcp_addr_t {
|
2005-07-03 20:06:07 +04:00
|
|
|
opal_object_t super;
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t addr_name;
|
2004-09-02 18:20:13 +04:00
|
|
|
uint32_t addr_count;
|
|
|
|
uint32_t addr_next;
|
|
|
|
uint32_t addr_alloc;
|
2005-09-19 18:47:11 +04:00
|
|
|
bool addr_matched;
|
2004-09-02 18:20:13 +04:00
|
|
|
struct sockaddr_in* addr_inet;
|
|
|
|
};
|
|
|
|
typedef struct mca_oob_tcp_addr_t mca_oob_tcp_addr_t;
|
|
|
|
|
|
|
|
OBJ_CLASS_DECLARATION(mca_oob_tcp_addr_t);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unpack the contact information posted by the peer.
|
|
|
|
*/
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
mca_oob_tcp_addr_t* mca_oob_tcp_addr_unpack(orte_buffer_t*);
|
2004-09-02 18:20:13 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Pack this hosts addressing info into a buffer for posting
|
|
|
|
* into the registry.
|
|
|
|
*/
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
int mca_oob_tcp_addr_pack(orte_buffer_t*);
|
2004-09-02 18:20:13 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
int mca_oob_tcp_addr_insert(mca_oob_tcp_addr_t*, const struct sockaddr_in*);
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
int mca_oob_tcp_addr_get_next(mca_oob_tcp_addr_t*, struct sockaddr_in*);
|
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-09-02 18:20:13 +04:00
|
|
|
#endif
|
|
|
|
|