Module: PacketFu::EthHeaderMixin
- Included in:
- ARPPacket, EthPacket, HSRPPacket, ICMPPacket, ICMPv6Packet, IPPacket, IPv6Packet, LLDPPacket, TCPPacket, UDPPacket
- Defined in:
- lib/packetfu/protos/eth/mixin.rb
Overview
This Mixin simplifies access to the EthHeaders. Mix this in with your packet interface, and it will add methods that essentially delegate to the ‘eth_header’ method (assuming that it is a EthHeader object)
Instance Method Summary collapse
- #eth_daddr ⇒ Object
- #eth_daddr=(v) ⇒ Object
- #eth_dst ⇒ Object
- #eth_dst=(v) ⇒ Object
- #eth_dst_readable ⇒ Object
- #eth_proto ⇒ Object
- #eth_proto=(v) ⇒ Object
- #eth_proto_readable ⇒ Object
- #eth_saddr ⇒ Object
- #eth_saddr=(v) ⇒ Object
- #eth_src ⇒ Object
- #eth_src=(v) ⇒ Object
- #eth_src_readable ⇒ Object
Instance Method Details
#eth_daddr ⇒ Object
7 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 7 def eth_daddr; self.eth_header.eth_daddr ; end |
#eth_daddr=(v) ⇒ Object
8 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 8 def eth_daddr=(v); self.eth_header.eth_daddr= v; end |
#eth_dst ⇒ Object
9 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 9 def eth_dst; self.eth_header.eth_dst ; end |
#eth_dst=(v) ⇒ Object
10 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 10 def eth_dst=(v); self.eth_header.eth_dst= v; end |
#eth_dst_readable ⇒ Object
11 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 11 def eth_dst_readable; self.eth_header.eth_dst_readable ; end |
#eth_proto ⇒ Object
12 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 12 def eth_proto; self.eth_header.eth_proto ; end |
#eth_proto=(v) ⇒ Object
13 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 13 def eth_proto=(v); self.eth_header.eth_proto= v; end |
#eth_proto_readable ⇒ Object
14 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 14 def eth_proto_readable; self.eth_header.eth_proto_readable ; end |
#eth_saddr ⇒ Object
15 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 15 def eth_saddr; self.eth_header.eth_saddr ; end |
#eth_saddr=(v) ⇒ Object
16 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 16 def eth_saddr=(v); self.eth_header.eth_saddr= v; end |
#eth_src ⇒ Object
17 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 17 def eth_src; self.eth_header.eth_src ; end |
#eth_src=(v) ⇒ Object
18 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 18 def eth_src=(v); self.eth_header.eth_src= v; end |
#eth_src_readable ⇒ Object
19 |
# File 'lib/packetfu/protos/eth/mixin.rb', line 19 def eth_src_readable; self.eth_header.eth_src_readable ; end |