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

mac.h File Reference

#include <assert.h>
#include "bi-connector.h"
#include "packet.h"
#include "ip.h"
#include "route.h"
#include "ll.h"
#include "phy.h"
#include "marshall.h"
#include "channel.h"

Include dependency graph for mac.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  hdr_mac
class  Mac
class  MacHandlerResume
class  MacHandlerSend
class  Tap

Defines

#define ZERO   0.00000
#define EF_COLLISION   2
#define ETHER_ADDR(x)   (GET4BYTE(x))
#define MAC_HDR_LEN   64
#define MAC_BROADCAST   ((u_int32_t) 0xffffffff)
#define BCAST_ADDR   -1
#define ETHER_ADDR_LEN   6
#define ETHER_TYPE_LEN   2
#define ETHER_FCS_LEN   4
#define ETHERTYPE_IP   0x0800
#define ETHERTYPE_ARP   0x0806

Enumerations

enum  MacState {
  MAC_IDLE = 0x0000, MAC_POLLING = 0x0001, MAC_RECV = 0x0010, MAC_SEND = 0x0100,
  MAC_RTS = 0x0200, MAC_CTS = 0x0400, MAC_ACK = 0x0800, MAC_COLL = 0x1000
}
enum  MacFrameType {
  MF_BEACON = 0x0008, MF_CONTROL = 0x0010, MF_SLOTS = 0x001a, MF_RTS = 0x001b,
  MF_CTS = 0x001c, MF_ACK = 0x001d, MF_CF_END = 0x001e, MF_POLL = 0x001f,
  MF_DATA = 0x0020, MF_DATA_ACK = 0x0021
}


Define Documentation

#define BCAST_ADDR   -1
 

Definition at line 71 of file mac.h.

Referenced by MacClassifier::recv(), and Mac802_3::recv_complete().

#define EF_COLLISION   2
 

Definition at line 60 of file mac.h.

#define ETHER_ADDR  )     (GET4BYTE(x))
 

Definition at line 66 of file mac.h.

Referenced by Mac802_11::check_pktTx(), Mac802_11::discard(), CMUTrace::format_mac(), MacTdma::hdr_dst(), Mac802_11::hdr_dst(), MacTdma::hdr_src(), Mac802_11::hdr_src(), MacTdma::makePreamble(), Mac802_11::recv_timer(), Mac802_11::recvDATA(), MacTdma::recvHandler(), Mac802_11::recvRTS(), Mac802_11::RetransmitDATA(), MacTdma::send(), Mac802_11::send(), Mac802_11::sendDATA(), MacTdma::sendDown(), MacTdma::trace_pkt(), Mac802_11::trace_pkt(), and Mac802_11::tx_resume().

#define ETHER_ADDR_LEN   6
 

Definition at line 73 of file mac.h.

#define ETHER_FCS_LEN   4
 

Definition at line 75 of file mac.h.

#define ETHER_TYPE_LEN   2
 

Definition at line 74 of file mac.h.

#define ETHERTYPE_ARP   0x0806
 

Definition at line 78 of file mac.h.

Referenced by ArpAgent::ArpAgent(), ARPTable::arpinput(), and ARPTable::arprequest().

#define ETHERTYPE_IP   0x0800
 

Definition at line 77 of file mac.h.

Referenced by ArpAgent::ArpAgent(), ARPTable::arprequest(), SatLL::sendDown(), and LL::sendDown().

#define MAC_BROADCAST   ((u_int32_t) 0xffffffff)
 

Definition at line 70 of file mac.h.

Referenced by ARPTable::arprequest(), DiffusionRate::BcastNeg(), Mac802_11::check_pktTx(), SMAC::checkToSend(), DiffusionRate::consider_new(), DiffusionRate::consider_old(), Mac802_11::discard(), SMAC::drop_DATA(), UnslottedAlohaMac::end_of_contention(), DiffusionRate::FwdOriginal(), DiffusionRate::FwdSubsample(), SMAC::handleCounterTimer(), SMAC::handleDATA(), DiffusionRate::InterestHandle(), DiffusionProb::InterestPropagate(), OmniMcastAgent::MACprepare(), FloodingAgent::MACprepare(), DiffusionAgent::MACprepare(), SRForwarder::recv(), Mac802_11::recv_timer(), Mac802_11::recvDATA(), MacTdma::recvHandler(), Mac802_11::RetransmitDATA(), Mac802_11::sendDATA(), SatLL::sendDown(), MacTdma::sendDown(), LL::sendDown(), DiffusionProb::SendInhibit(), SMAC::sendMsg(), DiffusionProb::SendNegReinf(), DSRAgent::sendOutPacketWithRoute(), Mac802_11::sendRTS(), UnslottedAlohaMac::sendUp(), SatMac::sendUp(), Mac::sendUp(), MacTdma::slotHandler(), and Mac802_11::tx_resume().

#define MAC_HDR_LEN   64
 

Definition at line 68 of file mac.h.

Referenced by SMAC::sendACK(), Mac802_11::sendACK(), SMAC::sendCTS(), Mac802_11::sendCTS(), SMAC::sendRTS(), Mac802_11::sendRTS(), and Mac::txtime().

#define ZERO   0.00000
 

Definition at line 54 of file mac.h.

Referenced by TwoStateErrorModel::corrupt().


Enumeration Type Documentation

enum MacFrameType
 

Enumeration values:
MF_BEACON 
MF_CONTROL 
MF_SLOTS 
MF_RTS 
MF_CTS 
MF_ACK 
MF_CF_END 
MF_POLL 
MF_DATA 
MF_DATA_ACK 

Definition at line 91 of file mac.h.

Referenced by hdr_mac::ftype().

00091                   {
00092         MF_BEACON       = 0x0008, // beaconing
00093         MF_CONTROL      = 0x0010, // used as mask for control frame
00094         MF_SLOTS        = 0x001a, // announce slots open for contention
00095         MF_RTS          = 0x001b, // request to send
00096         MF_CTS          = 0x001c, // clear to send, grant
00097         MF_ACK          = 0x001d, // acknowledgement
00098         MF_CF_END       = 0x001e, // contention free period end
00099         MF_POLL         = 0x001f, // polling
00100         MF_DATA         = 0x0020, // also used as mask for data frame
00101         MF_DATA_ACK     = 0x0021  // ack for data frames
00102 };

enum MacState
 

Enumeration values:
MAC_IDLE 
MAC_POLLING 
MAC_RECV 
MAC_SEND 
MAC_RTS 
MAC_CTS 
MAC_ACK 
MAC_COLL 

Definition at line 80 of file mac.h.

Referenced by Mac::state().

00080               {
00081         MAC_IDLE        = 0x0000,
00082         MAC_POLLING     = 0x0001,
00083         MAC_RECV        = 0x0010,
00084         MAC_SEND        = 0x0100,
00085         MAC_RTS         = 0x0200,
00086         MAC_CTS         = 0x0400,
00087         MAC_ACK         = 0x0800,
00088         MAC_COLL        = 0x1000
00089 };


Generated on Tue Apr 20 12:22:38 2004 for NS2.26SourcesOriginal by doxygen 1.3.3