add SetAddress methods.

This commit is contained in:
Mathieu Lacage
2008-03-19 11:19:05 -07:00
parent 26f046edd5
commit 10bbdc4176
4 changed files with 16 additions and 0 deletions

View File

@@ -111,6 +111,12 @@ CsmaNetDevice::DoDispose ()
NetDevice::DoDispose ();
}
void
CsmaNetDevice::SetAddress (Mac48Address self)
{
m_address = self;
}
void
CsmaNetDevice::SetSendEnable (bool sendEnable)
{

View File

@@ -180,6 +180,8 @@ enum CsmaEncapsulationMode {
void SetSendEnable (bool);
void SetReceiveEnable (bool);
void SetAddress (Mac48Address self);
// inherited from NetDevice base class.
virtual void SetName(const std::string name);

View File

@@ -87,6 +87,12 @@ PointToPointNetDevice::PointToPointNetDevice ()
PointToPointNetDevice::~PointToPointNetDevice ()
{}
void
PointToPointNetDevice::SetAddress (Mac48Address self)
{
m_address = self;
}
void
PointToPointNetDevice::AddHeader(Ptr<Packet> p, uint16_t protocolNumber)
{

View File

@@ -145,6 +145,8 @@ public:
*/
void Receive (Ptr<Packet> p);
void SetAddress (Mac48Address self);
// inherited from NetDevice base class.
virtual void SetName(const std::string name);
virtual std::string GetName(void) const;