|
VLANs(802.1Q)forOMNet++
0.5Beta
|
Extended Class to add interface name in the controlInfo. More...
#include <ARP_Vlans.h>
Protected Member Functions | |
| virtual void | sendPacketToNIC (cMessage *msg, InterfaceEntry *ie, const MACAddress &macAddress) |
| virtual void | initialize (int stage) |
Extended Class to add interface name in the controlInfo.
| void ARP_Vlans::initialize | ( | int | stage | ) | [protected, virtual] |
{
// Avoid Cleaning Global Cache
if (stage!=4) return;
ARP::initialize(stage);
}
| void ARP_Vlans::sendPacketToNIC | ( | cMessage * | msg, |
| InterfaceEntry * | ie, | ||
| const MACAddress & | macAddress | ||
| ) | [protected, virtual] |
{
// add control info with MAC address
Ieee802VlanCtrl *controlInfo = new Ieee802VlanCtrl();
controlInfo->setDest(macAddress);
controlInfo->setIfName(ie->getFullName());
msg->setControlInfo(controlInfo);
// Ensure BC MAC
if (dynamic_cast<ARPPacket *>(msg)){
(dynamic_cast<ARPPacket *>(msg))->setDestMACAddress(MACAddress::BROADCAST_ADDRESS);
}
// send out
// send(msg, nicOutBaseGateId + ie->getNetworkLayerGateIndex());
sendDirect(msg, getParentModule(), "ifOut",
ie->getNetworkLayerGateIndex());
}