2004-08-03 01:24:00 +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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-03 01:24:00 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* Contains header used by tcp oob.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MCA_OOB_TCP_HDR_H_
|
|
|
|
#define _MCA_OOB_TCP_HDR_H_
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "mca/ns/ns_types.h"
|
|
|
|
|
2004-09-02 03:07:40 +04:00
|
|
|
#define MCA_OOB_TCP_IDENT 1
|
2004-09-08 21:02:24 +04:00
|
|
|
#define MCA_OOB_TCP_DATA 2
|
|
|
|
#define MCA_OOB_TCP_PING 3
|
2004-09-02 03:07:40 +04:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
2004-08-03 01:24:00 +04:00
|
|
|
* Header used by tcp oob protocol.
|
|
|
|
*/
|
|
|
|
struct mca_oob_tcp_hdr_t {
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t msg_src;
|
|
|
|
orte_process_name_t msg_dst;
|
2004-09-02 03:07:40 +04:00
|
|
|
uint32_t msg_type; /**< type of message */
|
2004-08-03 01:24:00 +04:00
|
|
|
uint32_t msg_size; /**< the total size of the message body - excluding header */
|
|
|
|
int32_t msg_tag; /**< user provided tag */
|
|
|
|
};
|
|
|
|
typedef struct mca_oob_tcp_hdr_t mca_oob_tcp_hdr_t;
|
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convert the message header to host byte order
|
|
|
|
*/
|
2004-09-02 03:07:40 +04:00
|
|
|
#define MCA_OOB_TCP_HDR_NTOH(h) \
|
|
|
|
OMPI_PROCESS_NAME_NTOH((h)->msg_src); \
|
|
|
|
OMPI_PROCESS_NAME_NTOH((h)->msg_dst); \
|
2004-11-20 22:12:43 +03:00
|
|
|
(h)->msg_type = ntohl((h)->msg_type); \
|
|
|
|
(h)->msg_size = ntohl((h)->msg_size); \
|
|
|
|
(h)->msg_tag = ntohl((h)->msg_tag);
|
2004-08-03 01:24:00 +04:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convert the message header to network byte order
|
|
|
|
*/
|
2004-09-02 03:07:40 +04:00
|
|
|
#define MCA_OOB_TCP_HDR_HTON(h) \
|
|
|
|
OMPI_PROCESS_NAME_HTON((h)->msg_src); \
|
|
|
|
OMPI_PROCESS_NAME_HTON((h)->msg_dst); \
|
2004-11-20 22:12:43 +03:00
|
|
|
(h)->msg_type = htonl((h)->msg_type); \
|
|
|
|
(h)->msg_size = htonl((h)->msg_size); \
|
|
|
|
(h)->msg_tag = htonl((h)->msg_tag);
|
2004-08-03 01:24:00 +04:00
|
|
|
|
|
|
|
#endif /* _MCA_OOB_TCP_MESSAGE_H_ */
|
|
|
|
|