|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.net.Packet
drcl.inet.mac.Mac_802_11_Packet
This class is the base class of IEEE802.11 RTS, CTS, ACK and Data frame classes.
Mac_802_11,
Mac_802_11_ACK_Frame,
Mac_802_11_CTS_Frame,
Mac_802_11_RTS_Frame,
Mac_802_11_Data_Frame,
Mac_802_11_Frame_Control| Field Summary | |
static int |
EHTER_FCS_LEN
|
static int |
ETHER_ADDR_LEN
|
static int |
ETHER_TYPE_LEN
|
| Fields inherited from class drcl.net.Packet |
body, headerSize, id, size |
| Constructor Summary | |
Mac_802_11_Packet()
Construct a 802_11 packet |
|
Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_)
Construct a 802_11 packet |
|
Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_,
boolean ferror_)
Construct a 802_11 packet |
|
Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_,
Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_,
boolean ferror_)
Construct a 802_11 packet |
|
Mac_802_11_Packet(Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_)
Construct a non-corrupted 802_11 packet with empty body |
|
Mac_802_11_Packet(Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_,
boolean ferror_)
Construct a 802_11 packet with empty body |
|
| Method Summary | |
java.lang.String |
_toString(java.lang.String separator_)
Prints the packet header. |
int |
getDuration()
Get the frame duration field (2 Byte) |
Mac_802_11_Frame_Control |
getFc()
Get the frame control field (2 Byte) |
int |
getFcs()
Get the frame check sequence (4 Byte) |
java.lang.String |
getName()
Returns the name of this packet. |
boolean |
isForcedError()
|
void |
set_fc_flags(boolean order_,
boolean wep_,
boolean more_data_,
boolean pwr_mgt_,
boolean retry_,
boolean more_frag_,
boolean from_ds_,
boolean to_ds_)
Set the frame control flags |
void |
setDuration(int d_)
Set the frame duration field (2 Byte) |
void |
setFc(Mac_802_11_Frame_Control fc_)
Set the frame control field (2 Byte) |
void |
setFcs(int fcs_)
Set the frame check sequence (4 Byte) |
void |
setForcedError(boolean b_)
|
| Methods inherited from class drcl.net.Packet |
clone, equals, getBody, getByteCount, getHeaderSize, getNumberCount, getPacketCount, getPacketSize, getPacketType, getSize, getSizeCount, getTimestamp, isByteCountSupported, isPacketCountSupported, isTimestampSupported, setBody, setBody, setHeaderSize, setPacketSize, setSize, setTimestamp, toString, toString, wraps |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ETHER_ADDR_LEN
public static final int ETHER_TYPE_LEN
public static final int EHTER_FCS_LEN
| Constructor Detail |
public Mac_802_11_Packet()
public Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_)
bsize_ - - body sizebody_ - - packet body
public Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_,
boolean ferror_)
bsize_ - - body sizebody_ - - packet bodyferror_ - - indicating if the packet is corrupted
public Mac_802_11_Packet(int hsize_,
int bsize_,
java.lang.Object body_,
Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_,
boolean ferror_)
bsize_ - - body sizebody_ - - packet bodyfc_ - - MAC frame controlduration_ - - durationfcs_ - - frame check sequenceferror_ - - indicating if the packet is corrupted
public Mac_802_11_Packet(Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_,
boolean ferror_)
fc_ - - MAC frame controlduration_ - - durationfcs_ - - frame check sequenceferror_ - - indicating if the packet is corrupted
public Mac_802_11_Packet(Mac_802_11_Frame_Control fc_,
int duration_,
int fcs_)
fc_ - - MAC frame controlduration_ - - durationfcs_ - - frame check sequence| Method Detail |
public java.lang.String getName()
Packet
getName in class Packetpublic void setForcedError(boolean b_)
public boolean isForcedError()
public Mac_802_11_Frame_Control getFc()
public void setFc(Mac_802_11_Frame_Control fc_)
public int getDuration()
public void setDuration(int d_)
public int getFcs()
public void setFcs(int fcs_)
public void set_fc_flags(boolean order_,
boolean wep_,
boolean more_data_,
boolean pwr_mgt_,
boolean retry_,
boolean more_frag_,
boolean from_ds_,
boolean to_ds_)
order_ - - 0, 1 order fieldwep_ - - set to 1 if the frame body field contains information processed by WEP algorithmmore_data_ - - set to 1 if AP has more data to transmit to the STApwr_mgt_ - - set to 1 if a STA is in power-savingretry_ - - set to 1 if it is a retransmission of an earlier framemore_frag_ - - set to 1 if there is one or more fragments to followfrom_ds_ - - set to 1 if data type frames existing the DSto_ds_ - - set to 1 if data type frames destined the DSpublic java.lang.String _toString(java.lang.String separator_)
Packet
_toString in class Packet
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||