Class: Capp::Packet::TCPHeader
- Inherits:
-
Struct
- Object
- Struct
- Capp::Packet::TCPHeader
- Defined in:
- lib/capp/packet.rb
Overview
TCP header. See RFC 793
Instance Attribute Summary collapse
-
#ack_number ⇒ Object
Returns the value of attribute ack_number.
-
#checksum ⇒ Object
Returns the value of attribute checksum.
-
#destination_port ⇒ Object
(also: #destination)
Returns the value of attribute destination_port.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#seq_number ⇒ Object
Returns the value of attribute seq_number.
-
#source_port ⇒ Object
(also: #source)
Returns the value of attribute source_port.
-
#urgent ⇒ Object
Returns the value of attribute urgent.
-
#window ⇒ Object
Returns the value of attribute window.
Instance Method Summary collapse
-
#ack? ⇒ Boolean
Is the acknowledgment flag set?.
-
#cwr? ⇒ Boolean
Is the congestion window reduced flag set?.
-
#ece? ⇒ Boolean
Is the explicit congestion notification echo flag set?.
-
#fin? ⇒ Boolean
Is the no-more-data flag set?.
-
#push? ⇒ Boolean
Is the push flag set?.
-
#rst? ⇒ Boolean
Is the reset flag set?.
-
#syn? ⇒ Boolean
Is the synchronize flag set?.
-
#urg? ⇒ Boolean
Is the urgent flag set?.
Instance Attribute Details
#ack_number ⇒ Object
Returns the value of attribute ack_number
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def ack_number @ack_number end |
#checksum ⇒ Object
Returns the value of attribute checksum
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def checksum @checksum end |
#destination_port ⇒ Object Also known as: destination
Returns the value of attribute destination_port
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def destination_port @destination_port end |
#flags ⇒ Object
Returns the value of attribute flags
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def flags @flags end |
#offset ⇒ Object
Returns the value of attribute offset
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def offset @offset end |
#seq_number ⇒ Object
Returns the value of attribute seq_number
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def seq_number @seq_number end |
#source_port ⇒ Object Also known as: source
Returns the value of attribute source_port
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def source_port @source_port end |
#urgent ⇒ Object
Returns the value of attribute urgent
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def urgent @urgent end |
#window ⇒ Object
Returns the value of attribute window
62 63 64 |
# File 'lib/capp/packet.rb', line 62 def window @window end |
Instance Method Details
#ack? ⇒ Boolean
Is the acknowledgment flag set?
72 73 74 |
# File 'lib/capp/packet.rb', line 72 def ack? Capp::TCP_ACK == flags & Capp::TCP_ACK end |
#cwr? ⇒ Boolean
Is the congestion window reduced flag set?
79 80 81 |
# File 'lib/capp/packet.rb', line 79 def cwr? Capp::TCP_CWR == flags & Capp::TCP_CWR end |
#ece? ⇒ Boolean
Is the explicit congestion notification echo flag set?
86 87 88 |
# File 'lib/capp/packet.rb', line 86 def ece? Capp::TCP_ECE == flags & Capp::TCP_ECE end |
#fin? ⇒ Boolean
Is the no-more-data flag set?
93 94 95 |
# File 'lib/capp/packet.rb', line 93 def fin? Capp::TCP_FIN == flags & Capp::TCP_FIN end |
#push? ⇒ Boolean
Is the push flag set?
100 101 102 |
# File 'lib/capp/packet.rb', line 100 def push? Capp::TCP_PUSH == flags & Capp::TCP_PUSH end |
#rst? ⇒ Boolean
Is the reset flag set?
107 108 109 |
# File 'lib/capp/packet.rb', line 107 def rst? Capp::TCP_RST == flags & Capp::TCP_RST end |