summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-12-20 04:58:53 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-12-20 04:58:53 +0000
commit5f4c93a42c3f9845057b81e3090df7476dd5ba8e (patch)
tree92628a9da1f961848f9f685b10b3d710f80f2318 /protocols
parent6ae6b4b420fa85bcb10ec0ef2dee9d88a5e5c1a3 (diff)
downloadATCD-5f4c93a42c3f9845057b81e3090df7476dd5ba8e.tar.gz
ChangeLogTag:Fri Dec 19 22:56:26 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ace/RMCast/RMCast.h34
-rw-r--r--protocols/ace/RMCast/RMCast_IO_UDP.cpp24
-rw-r--r--protocols/ace/RMCast/RMCast_UDP_Proxy.cpp16
3 files changed, 33 insertions, 41 deletions
diff --git a/protocols/ace/RMCast/RMCast.h b/protocols/ace/RMCast/RMCast.h
index 4646a6bf0c2..aa6730f4b85 100644
--- a/protocols/ace/RMCast/RMCast.h
+++ b/protocols/ace/RMCast/RMCast.h
@@ -29,14 +29,6 @@
class ACE_Message_Block;
class ACE_RMCast_Proxy;
-// LynxOS 3.X defines the following macro
-#if defined (__Lynx__)
-# include <bsd/mbuf.h>
-# if defined(MT_DATA)
-# undef MT_DATA
-# endif /* MT_DATA */
-#endif /* __Lynx__ */
-
//! The RMCast namespace
/*!
Several simple data structures and enums are shared by all the
@@ -56,15 +48,15 @@ public:
enum Message_Type
{
// Sender initiated
- MT_POLL,
- MT_ACK_JOIN,
- MT_ACK_LEAVE,
- MT_DATA,
+ RMCAST_MT_POLL,
+ RMCAST_MT_ACK_JOIN,
+ RMCAST_MT_ACK_LEAVE,
+ RMCAST_MT_DATA,
// Receiver initiated
- MT_JOIN,
- MT_LEAVE,
- MT_ACK,
- MT_LAST
+ RMCAST_MT_JOIN,
+ RMCAST_MT_LEAVE,
+ RMCAST_MT_ACK,
+ RMCAST_MT_LAST
};
//! Simle enum used to describe the state transitions for senders
@@ -150,7 +142,7 @@ public:
/*!
<CODE>
+---------+----------------------+<BR>
- | 8 bits | MT_POLL |<BR>
+ | 8 bits | RMCAST_MT_POLL |<BR>
+---------+----------------------+<BR>
</CODE>
*/
@@ -164,7 +156,7 @@ public:
/*!
<CODE>
+---------+----------------------+<BR>
- | 8 bits | MT_ACK_JOIN |<BR>
+ | 8 bits | RMCAST_MT_ACK_JOIN |<BR>
+---------+----------------------+<BR>
| 32 bits | next_sequence_number |<BR>
+---------+----------------------+<BR>
@@ -208,7 +200,7 @@ public:
*
* <CODE>
* +---------+----------------------+<BR>
- * | 8 bits | MT_ACK |<BR>
+ * | 8 bits | RMCAST_MT_ACK |<BR>
* +---------+----------------------+<BR>
* | 32 bits | next_expected |<BR>
* +---------+----------------------+<BR>
@@ -232,7 +224,7 @@ public:
/*
<CODE>
+---------+----------------------+<BR>
- | 8 bits | MT_JOIN |<BR>
+ | 8 bits | RMCAST_MT_JOIN |<BR>
+---------+----------------------+<BR>
</CODE>
*/
@@ -246,7 +238,7 @@ public:
/*!
<CODE>
+---------+----------------------+<BR>
- | 8 bits | MT_LEAVE |<BR>
+ | 8 bits | RMCAST_MT_LEAVE |<BR>
+---------+----------------------+<BR>
</CODE>
*/
diff --git a/protocols/ace/RMCast/RMCast_IO_UDP.cpp b/protocols/ace/RMCast/RMCast_IO_UDP.cpp
index 13801b47bd5..8b5ab58a333 100644
--- a/protocols/ace/RMCast/RMCast_IO_UDP.cpp
+++ b/protocols/ace/RMCast/RMCast_IO_UDP.cpp
@@ -107,7 +107,7 @@ ACE_RMCast_IO_UDP::handle_input (ACE_HANDLE)
int type = buffer[0];
- if (type < 0 || type >= ACE_RMCast::MT_LAST)
+ if (type < 0 || type >= ACE_RMCast::RMCAST_MT_LAST)
{
// @@ Log: invalid message type!!
// @@ TODO: should we return -1? The socket is still valid, it
@@ -142,10 +142,10 @@ ACE_RMCast_IO_UDP::handle_input (ACE_HANDLE)
// sender.
#if 0
- if (type == ACE_RMCast::MT_ACK
- || type == ACE_RMCast::MT_JOIN
- || type == ACE_RMCast::MT_LEAVE
- || type == ACE_RMCast::MT_ACK_LEAVE)
+ if (type == ACE_RMCast::RMCAST_MT_ACK
+ || type == ACE_RMCast::RMCAST_MT_JOIN
+ || type == ACE_RMCast::RMCAST_MT_LEAVE
+ || type == ACE_RMCast::RMCAST_MT_ACK_LEAVE)
{
// All these message types indicate a problem, the should be
// generated by receivers, not received by them.
@@ -246,7 +246,7 @@ ACE_RMCast_IO_UDP::send_data (ACE_RMCast::Data &data,
// update the portions that do change...
ACE_UINT32 tmp;
char header[1 + 3 * sizeof(ACE_UINT32)];
- header[0] = ACE_RMCast::MT_DATA;
+ header[0] = ACE_RMCast::RMCAST_MT_DATA;
tmp = ACE_HTONL (data.sequence_number);
ACE_OS::memcpy (header + 1,
@@ -309,7 +309,7 @@ ACE_RMCast_IO_UDP::send_poll (ACE_RMCast::Poll &,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_POLL;
+ header[0] = ACE_RMCast::RMCAST_MT_POLL;
// ACE_SOCK_MCast_Dgram disallows sending, but it actually works.
ACE_SOCK_Dgram &dgram = this->dgram_;
@@ -332,7 +332,7 @@ ACE_RMCast_IO_UDP::send_ack_join (ACE_RMCast::Ack_Join &ack_join,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_ACK_JOIN;
+ header[0] = ACE_RMCast::RMCAST_MT_ACK_JOIN;
ACE_UINT32 tmp = ACE_HTONL (ack_join.next_sequence_number);
ACE_OS::memcpy (header + 1,
@@ -358,7 +358,7 @@ ACE_RMCast_IO_UDP::send_ack_leave (ACE_RMCast::Ack_Leave &,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_ACK_LEAVE;
+ header[0] = ACE_RMCast::RMCAST_MT_ACK_LEAVE;
// ACE_SOCK_MCast_Dgram disallows sending, but it actually works.
ACE_SOCK_Dgram &dgram = this->dgram_;
@@ -383,7 +383,7 @@ ACE_RMCast_IO_UDP::send_ack (ACE_RMCast::Ack &ack,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_ACK;
+ header[0] = ACE_RMCast::RMCAST_MT_ACK;
ACE_UINT32 tmp = ACE_HTONL (ack.next_expected);
ACE_OS::memcpy (header + 1,
@@ -413,7 +413,7 @@ ACE_RMCast_IO_UDP::send_join (ACE_RMCast::Join &,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_JOIN;
+ header[0] = ACE_RMCast::RMCAST_MT_JOIN;
// ACE_SOCK_MCast_Dgram disallows sending, but it actually works.
ACE_SOCK_Dgram &dgram = this->dgram_;
@@ -436,7 +436,7 @@ ACE_RMCast_IO_UDP::send_leave (ACE_RMCast::Leave &,
// @@ TODO: We could keep the header pre-initialized, and only
// update the portions that do change...
char header[16];
- header[0] = ACE_RMCast::MT_LEAVE;
+ header[0] = ACE_RMCast::RMCAST_MT_LEAVE;
// ACE_SOCK_MCast_Dgram disallows sending, but it actually works.
ACE_SOCK_Dgram &dgram = this->dgram_;
diff --git a/protocols/ace/RMCast/RMCast_UDP_Proxy.cpp b/protocols/ace/RMCast/RMCast_UDP_Proxy.cpp
index accb6453f92..7801a3f2ce3 100644
--- a/protocols/ace/RMCast/RMCast_UDP_Proxy.cpp
+++ b/protocols/ace/RMCast/RMCast_UDP_Proxy.cpp
@@ -33,17 +33,17 @@ ACE_RMCast_UDP_Proxy::receive_message (char *buffer, size_t size)
// @@ What should we do with invalid messages like this?
//
- if (type < 0 || type >= ACE_RMCast::MT_LAST)
+ if (type < 0 || type >= ACE_RMCast::RMCAST_MT_LAST)
return 0;
- if (type == ACE_RMCast::MT_POLL)
+ if (type == ACE_RMCast::RMCAST_MT_POLL)
{
ACE_RMCast::Poll poll;
poll.source = this;
return this->poll (poll);
}
- else if (type == ACE_RMCast::MT_ACK_JOIN)
+ else if (type == ACE_RMCast::RMCAST_MT_ACK_JOIN)
{
ACE_RMCast::Ack_Join ack_join;
ack_join.source = this;
@@ -63,14 +63,14 @@ ACE_RMCast_UDP_Proxy::receive_message (char *buffer, size_t size)
return this->ack_join (ack_join);
}
- else if (type == ACE_RMCast::MT_ACK_LEAVE)
+ else if (type == ACE_RMCast::RMCAST_MT_ACK_LEAVE)
{
ACE_RMCast::Ack_Leave ack_leave;
ack_leave.source = this;
return this->ack_leave (ack_leave);
}
- else if (type == ACE_RMCast::MT_DATA)
+ else if (type == ACE_RMCast::RMCAST_MT_DATA)
{
ACE_RMCast::Data data;
data.source = this;
@@ -105,21 +105,21 @@ ACE_RMCast_UDP_Proxy::receive_message (char *buffer, size_t size)
return this->data (data);
}
- else if (type == ACE_RMCast::MT_JOIN)
+ else if (type == ACE_RMCast::RMCAST_MT_JOIN)
{
ACE_RMCast::Join join;
join.source = this;
return this->join (join);
}
- else if (type == ACE_RMCast::MT_LEAVE)
+ else if (type == ACE_RMCast::RMCAST_MT_LEAVE)
{
ACE_RMCast::Leave leave;
leave.source = this;
return this->leave (leave);
}
- else if (type == ACE_RMCast::MT_ACK)
+ else if (type == ACE_RMCast::RMCAST_MT_ACK)
{
ACE_RMCast::Ack ack;
ack.source = this;