DESERT 3.5.1
Loading...
Searching...
No Matches
UWMllModule Class Reference

#include <uwmll-module.h>

Inheritance diagram for UWMllModule:
Collaboration diagram for UWMllModule:

Public Member Functions

 UWMllModule ()
 
 ~UWMllModule ()
 
virtual int crLayCommand (ClMessage *m)
 
virtual int recvAsyncClMsg (ClMessage *m)
 
virtual int recvSyncClMsg (ClMessage *m)
 
virtual int command (int argc, const char *const *argv)
 
virtual void recv (Packet *p)
 
virtual void recv (Packet *p, int idSrc)
 

Protected Member Functions

virtual void sendDown (Packet *p)
 
virtual void sendUp (Packet *p)
 
virtual int getDownAddr (int downId=-1)
 
virtual int arpResolve (nsaddr_t dst, Packet *p)
 
void incrArpPktDrop ()
 
int getArpPktDropped ()
 

Protected Attributes

UWARPTablearptable_
 
vector< nsaddr_t > netAddr
 
int seqno_
 
int n_arp_pkt_drop
 
int enable_addr_copy
 

Detailed Description

Module for ARP-resolve.

Should live between one or more IPModule and one MMacModule NOTE: You should only use one MMacModule below this module, else behavior is undef

Definition at line 67 of file uwmll-module.h.

Constructor & Destructor Documentation

◆ UWMllModule()

UWMllModule::UWMllModule ( )

Constructor.

Definition at line 74 of file uwmll-module.cpp.

◆ ~UWMllModule()

UWMllModule::~UWMllModule ( )

Desctructor.

Definition at line 82 of file uwmll-module.cpp.

Member Function Documentation

◆ arpResolve()

int UWMllModule::arpResolve ( nsaddr_t  dst,
Packet *  p 
)
protectedvirtual

Resolve MAC address for given dst address.

Parameters
dstIP destination address
ppacket which requested the resolv, will be cached
Returns
0 if ARP request successfully sent, otherwise some error number

Definition at line 221 of file uwmll-module.cpp.

◆ command()

int UWMllModule::command ( int  argc,
const char *const *  argv 
)
virtual

TCL Command handler.

Definition at line 105 of file uwmll-module.cpp.

◆ crLayCommand()

int UWMllModule::crLayCommand ( ClMessage *  m)
virtual

Receive asyncronous commands In Practive only IPModule telling us its IP-address.

Parameters
mPointer to message object
Returns
1 on success

Definition at line 87 of file uwmll-module.cpp.

◆ getArpPktDropped()

int UWMllModule::getArpPktDropped ( )
inlineprotected

Definition at line 128 of file uwmll-module.h.

◆ getDownAddr()

int UWMllModule::getDownAddr ( int  downId = -1)
protectedvirtual

Retrieve MAC address for lower layer.

Parameters
downIdid of downward module if> -1, only the module with id downId will be asked, else request is broadcasted
Returns
the MAC address of lower layer

Definition at line 242 of file uwmll-module.cpp.

◆ incrArpPktDrop()

void UWMllModule::incrArpPktDrop ( )
inlineprotected

Definition at line 122 of file uwmll-module.h.

◆ recv() [1/2]

void UWMllModule::recv ( Packet *  p)
virtual

Retrieve packets from other modules.

Definition at line 131 of file uwmll-module.cpp.

◆ recv() [2/2]

void UWMllModule::recv ( Packet *  p,
int  idSrc 
)
virtual

Retrieve packets from other modules This method is used to know which mac-module to send ARP-replies to.

Definition at line 137 of file uwmll-module.cpp.

◆ recvAsyncClMsg()

int UWMllModule::recvAsyncClMsg ( ClMessage *  m)
virtual

Definition at line 93 of file uwmll-module.cpp.

◆ recvSyncClMsg()

int UWMllModule::recvSyncClMsg ( ClMessage *  m)
virtual

Definition at line 99 of file uwmll-module.cpp.

◆ sendDown()

void UWMllModule::sendDown ( Packet *  p)
protectedvirtual

Handle packet going down.

Definition at line 149 of file uwmll-module.cpp.

◆ sendUp()

void UWMllModule::sendUp ( Packet *  p)
protectedvirtual

Handle packet going up.

Definition at line 236 of file uwmll-module.cpp.

Member Data Documentation

◆ arptable_

UWARPTable* UWMllModule::arptable_
protected

Pointer to an arptable.

Definition at line 134 of file uwmll-module.h.

◆ enable_addr_copy

int UWMllModule::enable_addr_copy
protected

Definition at line 144 of file uwmll-module.h.

◆ n_arp_pkt_drop

int UWMllModule::n_arp_pkt_drop
protected

Definition at line 142 of file uwmll-module.h.

◆ netAddr

vector<nsaddr_t> UWMllModule::netAddr
protected

List of IP address to our upper layers.

Definition at line 137 of file uwmll-module.h.

◆ seqno_

int UWMllModule::seqno_
protected

Link layer sequence number.

Definition at line 140 of file uwmll-module.h.


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