Enable both ascii and pcap tracing
This commit is contained in:
@@ -80,6 +80,18 @@ NetDevice::GetName(void) const
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void
|
||||
NetDevice::SetIfIndex(uint32_t index)
|
||||
{
|
||||
m_ifIndex = index;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
NetDevice::GetIfIndex(void) const
|
||||
{
|
||||
return m_ifIndex;
|
||||
}
|
||||
|
||||
bool
|
||||
NetDevice::IsLinkUp (void) const
|
||||
{
|
||||
|
||||
@@ -106,6 +106,14 @@ public:
|
||||
* \return name name of the device (e.g. "eth0")
|
||||
*/
|
||||
std::string GetName(void) const;
|
||||
/**
|
||||
* \param index ifIndex of the device
|
||||
*/
|
||||
void SetIfIndex(const uint32_t);
|
||||
/**
|
||||
* \return index ifIndex of the device
|
||||
*/
|
||||
uint32_t GetIfIndex(void) const;
|
||||
/**
|
||||
* \return true if link is up; false otherwise
|
||||
*/
|
||||
@@ -153,6 +161,15 @@ public:
|
||||
* \return whether the Send operation succeeded
|
||||
*/
|
||||
bool Send(Packet& p, const MacAddress& dest, uint16_t protocolNumber);
|
||||
/**
|
||||
* \returns the node base class which contains this network
|
||||
* interface.
|
||||
*
|
||||
* When a subclass needs to get access to the underlying node
|
||||
* base class to print the nodeid for example, it can invoke
|
||||
* this method.
|
||||
*/
|
||||
Node* PeekNode (void) const;
|
||||
|
||||
bool NeedsArp (void) const;
|
||||
|
||||
@@ -195,15 +212,6 @@ public:
|
||||
* down, it notifies its parent class by calling this method.
|
||||
*/
|
||||
void NotifyLinkDown (void);
|
||||
/**
|
||||
* \returns the node base class which contains this network
|
||||
* interface.
|
||||
*
|
||||
* When a subclass needs to get access to the underlying node
|
||||
* base class to print the nodeid for example, it can invoke
|
||||
* this method.
|
||||
*/
|
||||
Node* PeekNode (void) const;
|
||||
|
||||
/**
|
||||
* \param p packet sent from below up to Network Device
|
||||
|
||||
@@ -75,6 +75,7 @@ Node::AddDevice (NetDevice *device)
|
||||
uint32_t index = m_devices.size ();
|
||||
m_devices.push_back (device);
|
||||
DoAddDevice (device);
|
||||
device->SetIfIndex(index);
|
||||
return index;
|
||||
}
|
||||
NetDevice *
|
||||
|
||||
Reference in New Issue
Block a user