|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.protocol.data.VNSData net.clackrouter.packets.VNSPacket net.clackrouter.packets.VNSARPPacket
public class VNSARPPacket
Encapsulates Address Resolution Protocol packet.
Field Summary | |
---|---|
static int |
HLEN_LEN
Length of the harware address length field, in bytes. |
static int |
HW_ADDR_LEN
Length of the harware address field, in bytes. |
static short |
HW_TYPE_ETHERNET
Value of the hardware type field of Ethernet. |
static int |
HW_TYPE_LEN
Length of the harware type field, in bytes. |
static int |
OPERATION_LEN
Length of the operation field, in bytes. |
static short |
OPERATION_REPLY
Value of the operation fieled of ARP reply. |
static short |
OPERATION_REQUEST
Value of the operation fieled of ARP request. |
static short |
OPERATION_REVERSE_REPLY
Value of the operation fieled of RARP reply. |
static short |
OPERATION_REVERSE_REQUEST
Value of the operation fieled of RARP request. |
static int |
PLEN_LEN
Length of the protocol address length field, in bytes. |
static int |
PROTOCOL_ADDR_LEN
Length of the protocol address field, in bytes. |
static short |
PROTOCOL_TYPE_IP
Value of the protocol type field of IP. |
static int |
PROTOCOL_TYPE_LEN
Length of the protocol type field, in bytes. |
static int |
TOTAL_LEN
Total length of the ARP packet, in bytes. |
Fields inherited from class net.clackrouter.packets.VNSPacket |
---|
m_inputInterfaceName, m_length, m_level2Type, m_local_packet, m_nextHopIPAddr, m_nextHopMacAddr, m_outputInterfaceName, m_packetByteBuffer, mParentHeader |
Constructor Summary | |
---|---|
VNSARPPacket(java.nio.ByteBuffer packetByteBuffer)
Constructs ARP packet from the supplied bytes. |
|
VNSARPPacket(short hwType,
short protocolType,
byte hLen,
byte pLen,
short operation,
java.nio.ByteBuffer sourceHWAddress,
java.nio.ByteBuffer sourceProtocolAddress,
java.nio.ByteBuffer destinationHWAddress,
java.nio.ByteBuffer destinationProtocolAddress)
Creates ARP packet from the supplied parameters. |
Method Summary | |
---|---|
java.nio.ByteBuffer |
getDestinationHWAddress()
Returns destination hardware address. |
java.nio.ByteBuffer |
getDestinationProtocolAddress()
Returns destination protocol address. |
byte |
getHWAddressLength()
Returns hardware address length. |
short |
getHWType()
Returns hardware type. |
short |
getOperation()
Returns operation (Request, Reply, etc.) |
byte |
getProtocolAddressLength()
Returns protocol address length. |
short |
getProtocolType()
Returns protocol type. |
java.nio.ByteBuffer |
getSourceHWAddress()
Returns source hardware address. |
java.nio.ByteBuffer |
getSourceProtocolAddress()
Returns source protocol address. |
java.lang.String |
toString()
Presents ARP packet in a readable format, by field. |
Methods inherited from class net.clackrouter.packets.VNSPacket |
---|
addToPath, get16bit, get32bit, getByteBuffer, getInputInterfaceName, getLength, getLevel2Type, getNextHopIPAddress, getNextHopMacAddress, getOutputInterfaceName, getParentHeader, getStringBuffer, isPacket, needsSourceAddress, setByteBuffer, setInputInterfaceName, setLevel2Type, setNeedsSourceAddress, setNextHopIPAddress, setNextHopMacAddress, setOutputInterfaceName, setParentHeader |
Methods inherited from class net.clackrouter.protocol.data.VNSData |
---|
isBanner, isClose, isHWInfo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int HW_TYPE_LEN
public static final int PROTOCOL_TYPE_LEN
public static final int HLEN_LEN
public static final int PLEN_LEN
public static final int OPERATION_LEN
public static final int HW_ADDR_LEN
public static final int PROTOCOL_ADDR_LEN
public static final int TOTAL_LEN
public static final short OPERATION_REQUEST
public static final short OPERATION_REPLY
public static final short OPERATION_REVERSE_REQUEST
public static final short OPERATION_REVERSE_REPLY
public static final short HW_TYPE_ETHERNET
public static final short PROTOCOL_TYPE_IP
Constructor Detail |
---|
public VNSARPPacket(java.nio.ByteBuffer packetByteBuffer)
packetByteBuffer
- Buffer containing packet's bytespublic VNSARPPacket(short hwType, short protocolType, byte hLen, byte pLen, short operation, java.nio.ByteBuffer sourceHWAddress, java.nio.ByteBuffer sourceProtocolAddress, java.nio.ByteBuffer destinationHWAddress, java.nio.ByteBuffer destinationProtocolAddress)
hwType
- Hardware typeprotocolType
- Protocol typehLen
- Hardware address lengthpLen
- Protocol address lengthoperation
- Operation (e.g. Request)sourceHWAddress
- Hardware address of the source hostsourceProtocolAddress
- Protocol address of the source host (e.g. IP address)destinationHWAddress
- Harware address of the destination hostdestinationProtocolAddress
- Protocol address of the destination hostMethod Detail |
---|
public java.lang.String toString()
toString
in class VNSPacket
public short getHWType()
public short getProtocolType()
public byte getHWAddressLength()
public byte getProtocolAddressLength()
public short getOperation()
public java.nio.ByteBuffer getSourceProtocolAddress()
public java.nio.ByteBuffer getDestinationProtocolAddress()
public java.nio.ByteBuffer getSourceHWAddress()
public java.nio.ByteBuffer getDestinationHWAddress()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |