Class: Libnet::TCP
Overview
TCP
Class to represent an RFC 793 Transmission Control Protocol (TCP) header.
Example
t = Libnet::TCP.new
t.src_port = 0x4321
t.dst_port = 0xabcd
t.seq = 32
t.ack = 0
t.control = 0x0b
t.window = 0x1122
t.checksum = 0x1111
t.urgent = 0
t.payload = payload
Public Class Methods
decode(string) -> new TCP object
Decode a packed TCP packet.
Public Instance Methods
src_port, src_port=, src_port?
Get/set/query the source port.
dst_port, dst_port=, dst_port?
Get/set/query the destination port.
seq, seq=, seq?
Get/set/query the sequence number.
ack, ack=, ack?
Get/set/query the acknowledgement number.
data_offset, data_offset?
Get/query the data offset.
reserved, reserved?
Get/query the reserved field.
control, control=, control?
Get/set/query the control flags.
window, window=, window?
Get/set/query the window size.
checksum, checksum=, checksum?
Get/set/query the checksum.
urgent, urgent=, urgent?
Get/set/query the urgent pointer.
payload, payload=, payload?
Get/set/query the payload.
ptag
Get the ptag value for this header object. Set by the Libnet builder method.
Constant Summary
Constants inherited from Header
Header::DEFAULT_OPTS, Header::HWADDR_RE, Header::IPADDR_RE, Header::UNIT_MULTIPLIERS
Instance Attribute Summary
Attributes inherited from Header
Method Summary
Methods inherited from Header
assignment_filter, decode, fields, inherited, #initialize, octets_field, unsigned_field
Methods included from Helpers
Constructor Details
This class inherits a constructor from Libnet::Header