[Ns-bugs] [Bug 833] OnOffApplication with PacketSocket: sniffs all traffic
code at nsnam.ece.gatech.edu
Wed Apr 14 10:32:51 PDT 2010
--- Comment #8 from Josh Pelkey <jpelkey at gatech.edu> 2010-04-14 13:32:51 EDT ---
(In reply to comment #7)
> When you use OnOffApplication with a PacketSocket, this happens:
> 1- OnOffApplication calls Bind() on the socket, with no arguments;
> 2- PacketSocket's Bind() implementation calls Node::RegisterProtocolHandler,
> to receive ALL packets and send them to PacketSocket::ForwardUp;
> 3- PacketSocket::ForwardUp stores received packets in a "receive queue";
> I am just saying that it is strange that an application that supposedly only
> sends traffic is configuring the socket to sniff traffic and store in a queue.
> Memory and computation bloat.
> ShutDownRcv() is one possible solution...
Why was my brain reading PacketSocket and thinking PacketSink over and over
again? I see what you are going for here. So the remaining issue is just
calling ShutdownSend in OnOff when using tcp socket. Will have a look and see
if I can come up with a fix, but I agree (finally) patch looks good. +1 after
fixing tcp issue.
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs