Class: DIY::PacketEx
- Inherits:
-
Object
- Object
- DIY::PacketEx
- Defined in:
- lib/diy/pcap.rb
Constant Summary collapse
- SEND =
1
- RECV =
0
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#pkt ⇒ Object
readonly
Returns the value of attribute pkt.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(pkt, pos, filename = nil) ⇒ PacketEx
constructor
A new instance of PacketEx.
- #size ⇒ Object
- #to_inner? ⇒ Boolean
- #to_outer? ⇒ Boolean
Constructor Details
#initialize(pkt, pos, filename = nil) ⇒ PacketEx
Returns a new instance of PacketEx.
113 114 115 116 117 |
# File 'lib/diy/pcap.rb', line 113 def initialize( pkt, pos, filename = nil ) @pkt = pkt @pos = pos @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
131 132 133 |
# File 'lib/diy/pcap.rb', line 131 def filename @filename end |
#pkt ⇒ Object (readonly)
Returns the value of attribute pkt.
131 132 133 |
# File 'lib/diy/pcap.rb', line 131 def pkt @pkt end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
131 132 133 |
# File 'lib/diy/pcap.rb', line 131 def pos @pos end |
Instance Method Details
#size ⇒ Object
127 128 129 |
# File 'lib/diy/pcap.rb', line 127 def size @pkt.size end |