VLANs(802.1Q)forOMNet++  0.5Beta
ARP_Vlans Class Reference

Extended Class to add interface name in the controlInfo. More...

#include <ARP_Vlans.h>

List of all members.

Protected Member Functions

virtual void sendPacketToNIC (cMessage *msg, InterfaceEntry *ie, const MACAddress &macAddress)
virtual void initialize (int stage)

Detailed Description

Extended Class to add interface name in the controlInfo.


Member Function Documentation

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());
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends Defines