To provide some more info:
Suppose I have the following topology: http://old.nabble.com/file/p34250683/topology.jpeg What I want is node D to drop packets from some specific nodes. What I've done is the following: I added one variables in the node.cc && node.h to define if the packets from that node are to be dropped and I also added one variable to the packet.cc (in the header of the packet) to define after how many hops the packet is to be dropped. In the connector.cc I have changed the recv(Packet* p, Handler* h) function in order to check if the packet is to be dropped. If not then I update the packet's hop variable I created (increase it to show the number of hops that packet has been over). If the packet is to be dropped though I call the drop(p) function. As I said that does not work properly since (probably) the Packet::free(p) function is used as I don't see the packet drop events in the traces. Anyone knows what I'm doing wrong? Should I define a drop-target for D and connect it to the agents from the nodes that I want packets to be dropped? And exactly how am I supposed to do that (since I tried but I failed)? Thanks in advance and I hope that these information give a clearer view of my situation. -- View this message in context: http://old.nabble.com/Properly-drop-packet-tp34250208p34250683.html Sent from the ns-users mailing list archive at Nabble.com.