Bugzilla – Bug 2130
Allow SimpleChannel to simulate hidden terminals.
Last modified: 2015-06-11 14:22:59 EDT
Created attachment 2054 [details] Ban / Un-Ban In tests it is often necessary to mimic a wireless system where one node can "see" two other nodes, but these nodes can not communicate. This happens if, for example, the three nodes are in a line topology. This patch adds to functions: Ban and UnBan. The first blocks all the communications between A and B (unidirectional), the second restores them.
+1
changeset: 11438:dfbb52d8fd44
Hi, Can we clarify what was the original intention of SimpleChannel? Can we model, hidden-terminals through a combination of Error models and loss models? Can SimpleChannel be sub-classed to provide hidden-terminal? Just trying to think out loud here. john
Hi, it could have been done using error models. However, the error models are MAC address-agnostic. I.e., it's hard to build an error model saying "trash all the packets from X to Y". It's possible, but I didn't like it. The same goes for loss models. The MatrixPropagatinLossModel can do a similar thing, but it is based on a Mobility object pairs, which is more general than a MAC address. That's why I added it to the SimpleChannel: it's more general. About what the SimpleChannel is for... easy: it's there for the tests, much like SimpleNetDevice, PacketSocketClient and PacketSocketServer. It's ok to use it for other purposes, but it's really tailored for the tests. Cheers, T. (In reply to John Abraham from comment #3) > Hi, > > Can we clarify what was the original intention of SimpleChannel? > > Can we model, hidden-terminals through a combination of Error models and > loss models? > > Can SimpleChannel be sub-classed to provide hidden-terminal? > > Just trying to think out loud here. > john
(In reply to Tommaso Pecorella from comment #4) > Hi, > > it could have been done using error models. However, the error models are > MAC address-agnostic. I.e., it's hard to build an error model saying "trash > all the packets from X to Y". It's possible, but I didn't like it. The same > goes for loss models. > > The MatrixPropagatinLossModel can do a similar thing, but it is based on a > Mobility object pairs, which is more general than a MAC address. > > That's why I added it to the SimpleChannel: it's more general. > > About what the SimpleChannel is for... easy: it's there for the tests, much > like SimpleNetDevice, PacketSocketClient and PacketSocketServer. > It's ok to use it for other purposes, but it's really tailored for the tests. > > Cheers, > > T. > > (In reply to John Abraham from comment #3) > > Hi, > > > > Can we clarify what was the original intention of SimpleChannel? > > > > Can we model, hidden-terminals through a combination of Error models and > > loss models? > > > > Can SimpleChannel be sub-classed to provide hidden-terminal? > > > > Just trying to think out loud here. > > john I was actually referring to Custom Error/Loss models, which keep track of receiver nodes that should be blocked for a given sender. At what point do we decide we want to add/stop adding channel properties to SimpleChannel? If we don't define the role of SimpleChannel/NetDevice clearly there will be no limit of properties users want.