java.lang.Object
net.i2p.client.streaming.impl.PcapWriter.Options
- Enclosing class:
PcapWriter
Builder for TCP option blocks in the pcap output.
Field Summary
Constructor Summary
ConstructorsMethod Summary
All Methods
Field Details
_b
private final byte[] _bBuffer holding the options read._len
private int _lenValid length of the options buffer.
Constructor Details
Options
public Options()Reads the options of one packet.
Method Details
getData
public byte[] getData()Returns the raw option data buffer (40 bytes long). The caller must usesize()to get the actual used length.- Returns:
- the option data buffer
size
public int size()Returns the actual option length, rounded up to the next 4-byte boundary.- Returns:
- the padded option length in bytes
add
public void add(byte type) Add a zero-data option.- Parameters:
type- the option type byte
add
public void add(byte type, int datalen, int data) Add an option with integer data.- Parameters:
type- the option type bytedatalen- the length of the data in bytesdata- the option data value