Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > confused about function recv(p,h) in class Phy in ns2.35.----- onlyfor ns2 users

Reply
Thread Tools

confused about function recv(p,h) in class Phy in ns2.35.----- onlyfor ns2 users

 
 
engineer
Guest
Posts: n/a
 
      03-07-2013
Dear friends,

I am reading ns2 code and trying to understand the class Phy. https://github.com/hbatmit/ns2.35/bl...ter/mac/phy.cc
Following lines are extracted from the function void Phy::recv(Packet* p, Handler*). I do not understand line 134 and want to know what lines exactly are executed when the function 'recv' is called. Here uptarget is a pointerof type biconnector (base class for Phy), but where does uptarget exactly pointing to.


------------------------------------------------------------------------
Packet::free(p);
return;
} else { //line 133
uptarget_->recv(p, (Handler*) 0); //line 134
}
break;
-----------------------------------------------------------------------------


Thanks in advance.
-Ahmed
 
Reply With Quote
 
 
 
 
Bart van Ingen Schenau
Guest
Posts: n/a
 
      03-07-2013
On Wed, 06 Mar 2013 20:07:54 -0800, engineer wrote:

> Dear friends,
>
> I am reading ns2 code and trying to understand the class Phy.
> https://github.com/hbatmit/ns2.35/bl...ter/mac/phy.cc Following lines
> are extracted from the function void Phy::recv(Packet* p, Handler*). I
> do not understand line 134 and want to know what lines exactly are
> executed when the function 'recv' is called. Here uptarget is a pointer
> of type biconnector (base class for Phy), but where does uptarget
> exactly pointing to.


It is impossible for us to tell what uptarget_ exactly points to. The
only thing we can tell is that it is an object of a class derived from
NSObject.

>
> Thanks in advance.
> -Ahmed


Bart v Ingen Schenau
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cheapest Cisco Switch with 1 Gig Ports and 10 Gig WAN-PHY Uplink? Will Cisco 7 11-25-2011 02:11 PM
Searching a behavior model for an Ethernet Phy in VHDL Johannes S. VHDL 0 05-09-2007 10:35 AM
network simulator - NS2 giantpassos Perl Misc 1 01-05-2007 06:23 PM
what does "sh controllers ethernet-controller g1/0/1 phy" show me? DuaneO Cisco 1 04-25-2006 11:47 PM
Problem while including iostream.h in files targetted by ns2.26 make Pradyot Dhulipala C++ 1 05-12-2004 01:19 PM



Advertisments