ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 


Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Mac Class Reference

#include <mac.h>

Inheritance diagram for Mac:

BiConnector NsObject TclObject Handler Mac802_11 Mac802_3 MacCsma MacSimple MacTdma MultihopMac SatMac SMAC List of all members.

Public Member Functions

 Mac ()
virtual void recv (Packet *p, Handler *h)
virtual void sendDown (Packet *p)
virtual void sendUp (Packet *p)
virtual void resume (Packet *p=0)
virtual void installTap (Tap *t)
double txtime (int bytes)
double txtime (Packet *p)
double bandwidth () const
int addr ()
MacState state ()
MacState state (int m)
virtual int hdr_dst (char *hdr, int dst=-2)
virtual int hdr_src (char *hdr, int src=-2)
virtual int hdr_type (char *hdr, u_int16_t type=0)

Protected Member Functions

int command (int argc, const char *const *argv)
virtual int initialized ()

Protected Attributes

int index_
double bandwidth_
double delay_
int abstract_
Phynetif_
Taptap_
LLll_
Channelchannel_
Handlercallback_
MacHandlerResume hRes_
MacHandlerSend hSend_
Event intr_
MacState state_
PacketpktRx_
PacketpktTx_

Private Member Functions

void mac_log (Packet *p)

Private Attributes

NsObjectlogtarget_

Constructor & Destructor Documentation

Mac::Mac  
 


Member Function Documentation

int Mac::addr   [inline]
 

double Mac::bandwidth   const [inline]
 

int Mac::command int    argc,
const char *const *    argv
[protected, virtual]
 

Reimplemented from BiConnector.

Reimplemented in Mac802_11, MacSimple, MacTdma, SMAC, and SatMac.

virtual int Mac::hdr_dst char *    hdr,
int    dst = -2
[inline, virtual]
 

Reimplemented in Mac802_11, MacTdma, and SMAC.

virtual int Mac::hdr_src char *    hdr,
int    src = -2
[inline, virtual]
 

Reimplemented in Mac802_11, MacTdma, and SMAC.

virtual int Mac::hdr_type char *    hdr,
u_int16_t    type = 0
[inline, virtual]
 

Reimplemented in Mac802_11, MacTdma, and SMAC.

virtual int Mac::initialized   [inline, protected, virtual]
 

Reimplemented in Mac802_11, and SMAC.

virtual void Mac::installTap Tap   t [inline, virtual]
 

void Mac::mac_log Packet   p [inline, private]
 

Reimplemented in Mac802_11, MacTdma, and SMAC.

void Mac::recv Packet   p,
Handler   h
[virtual]
 

Reimplemented from BiConnector.

Reimplemented in Mac802_11, Mac802_3, MultihopMac, MacSimple, MacTdma, and SMAC.

void Mac::resume Packet   p = 0 [virtual]
 

Reimplemented in MacCsma.

void Mac::sendDown Packet   p [virtual]
 

Reimplemented in MacTdma, SatMac, and UnslottedAlohaMac.

void Mac::sendUp Packet   p [virtual]
 

Reimplemented in MacTdma, SatMac, and UnslottedAlohaMac.

MacState Mac::state int    m [inline]
 

MacState Mac::state   [inline]
 

double Mac::txtime Packet   p [inline]
 

Reimplemented in Mac802_11, MacSimple, and SMAC.

double Mac::txtime int    bytes [inline]
 

Reimplemented in Mac802_11.


Member Data Documentation

int Mac::abstract_ [protected]
 

double Mac::bandwidth_ [protected]
 

Handler* Mac::callback_ [protected]
 

Channel* Mac::channel_ [protected]
 

double Mac::delay_ [protected]
 

MacHandlerResume Mac::hRes_ [protected]
 

MacHandlerSend Mac::hSend_ [protected]
 

int Mac::index_ [protected]
 

Event Mac::intr_ [protected]
 

LL* Mac::ll_ [protected]
 

NsObject* Mac::logtarget_ [private]
 

Reimplemented in Mac802_11, MacTdma, and SMAC.

Phy* Mac::netif_ [protected]
 

Packet* Mac::pktRx_ [protected]
 

Reimplemented in MacSimple, and SMAC.

Packet* Mac::pktTx_ [protected]
 

Reimplemented in MacSimple, and SMAC.

MacState Mac::state_ [protected]
 

Reimplemented in SMAC.

Tap* Mac::tap_ [protected]
 


The documentation for this class was generated from the following files:
This document is generated by doxygen.