Public Member Functions | Private Attributes

ArpHost Class Reference
[netwLayer - network layer modules]

A class to convert integer layer addresses. More...

#include <ArpHost.h>

Inherits ArpInterface, AddressingInterface, and BaseModule.

Collaboration diagram for ArpHost:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void initialize (int stage)
 Basic initialization for all modules.
virtual void handleMessage (cMessage *)
 should not be called, instead direct calls to the radio methods should be used.
virtual int getMacAddr (const int netwAddr)
 returns a L2 address to a given L3 address
virtual int getNetwAddr (const int macAddr)
 returns a L3 address to a given L2 address
virtual int myMacAddr (cModule *mac)
 Returns the L2 address for the passed mac.
virtual int myNetwAddr (cModule *netw)
 Returns the L3 address for the passed net.

Private Attributes

int offset

Detailed Description

A class to convert integer layer addresses.

This class assumes that a host contains a NetwLayer and a Nic module. The Nic module contains a MAC address. It also assumes that hosts are part of an array. macaddress=netaddress= host index in array.

Author:
Jerome Rousselot

Definition at line 41 of file ArpHost.h.


Member Function Documentation

void ArpHost::initialize ( int  stage  )  [virtual]

Basic initialization for all modules.

Subscription to Blackboard should be in stage==0, and firing notifications in stage==1 or later.

NOTE: You have to call this in the initialize() function of the inherited class!

Reimplemented from BaseModule.

Definition at line 25 of file ArpHost.cc.

                                  {
  BaseModule::initialize(stage);
    if(stage==0) {
        offset = par("offset");
  }
}


The documentation for this class was generated from the following files: