summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node/Packet.cpp2
-rw-r--r--node/Packet.hpp21
-rw-r--r--node/PacketDecoder.cpp7
-rw-r--r--node/PacketDecoder.hpp2
4 files changed, 24 insertions, 8 deletions
diff --git a/node/Packet.cpp b/node/Packet.cpp
index e11027f8..07d40b71 100644
--- a/node/Packet.cpp
+++ b/node/Packet.cpp
@@ -42,7 +42,7 @@ const char *Packet::verbString(Verb v)
case VERB_WHOIS: return "WHOIS";
case VERB_RENDEZVOUS: return "RENDEZVOUS";
case VERB_FRAME: return "FRAME";
- case VERB_BRIDGED_FRAME: return "BRIDGED_FRAME";
+ case VERB_EXT_FRAME: return "EXT_FRAME";
case VERB_MULTICAST_FRAME: return "MULTICAST_FRAME";
case VERB_MULTICAST_LIKE: return "MULTICAST_LIKE";
case VERB_NETWORK_MEMBERSHIP_CERTIFICATE: return "NETWORK_MEMBERSHIP_CERTIFICATE";
diff --git a/node/Packet.hpp b/node/Packet.hpp
index ade44bf5..e2de9f57 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -497,8 +497,22 @@ public:
*/
VERB_FRAME = 6,
- /* TODO: not implemented yet */
- VERB_BRIDGED_FRAME = 7,
+ /*
+ * An ethernet frame to or from specified MAC addresses:
+ * <[8] 64-bit network ID>
+ * <[6] destination MAC or all zero for destination node>
+ * <[6] source MAC or all zero for node of origin>
+ * <[2] 16-bit ethertype>
+ * <[...] ethernet payload>
+ *
+ * Extended frames include full MAC addressing and are used for bridged
+ * configurations. Theoretically they could carry multicast as well but
+ * currently they're not used for that.
+ *
+ * ERROR may be generated if a membership certificate is needed for a
+ * closed network. Payload will be network ID.
+ */
+ VERB_EXT_FRAME = 7,
/* A multicast frame:
* <[2] 16-bit propagation depth or 0xffff for "do not forward">
@@ -543,6 +557,9 @@ public:
* set in the bloom filter and addresses outside the propagation restrict
* prefix.
*
+ * Active bridges on a network are always added as next hops for all
+ * multicast and broadcast traffic, as if they "like" all groups.
+ *
* Algorithm for setting bits in bloom filter:
*
* (1) Place the address in the least significant 40 bits of a 64-bit int.
diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp
index b1b37160..6091196e 100644
--- a/node/PacketDecoder.cpp
+++ b/node/PacketDecoder.cpp
@@ -97,8 +97,8 @@ bool PacketDecoder::tryDecode(const RuntimeEnvironment *_r)
return _doRENDEZVOUS(_r,peer);
case Packet::VERB_FRAME:
return _doFRAME(_r,peer);
- case Packet::VERB_BRIDGED_FRAME:
- return _doBRIDGED_FRAME(_r,peer);
+ case Packet::VERB_EXT_FRAME:
+ return _doEXT_FRAME(_r,peer);
case Packet::VERB_MULTICAST_FRAME:
return _doMULTICAST_FRAME(_r,peer);
case Packet::VERB_MULTICAST_LIKE:
@@ -455,9 +455,8 @@ bool PacketDecoder::_doFRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer>
return true;
}
-bool PacketDecoder::_doBRIDGED_FRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer)
+bool PacketDecoder::_doEXT_FRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer)
{
- // TODO: bridging is not implemented yet
return true;
}
diff --git a/node/PacketDecoder.hpp b/node/PacketDecoder.hpp
index 9552c7fe..0a16ceb3 100644
--- a/node/PacketDecoder.hpp
+++ b/node/PacketDecoder.hpp
@@ -117,7 +117,7 @@ private:
bool _doWHOIS(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
bool _doRENDEZVOUS(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
bool _doFRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
- bool _doBRIDGED_FRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
+ bool _doEXT_FRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
bool _doMULTICAST_FRAME(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
bool _doMULTICAST_LIKE(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);
bool _doNETWORK_MEMBERSHIP_CERTIFICATE(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer);