Module: PacketFu::UDPHeaderMixin

Included in:
HSRPPacket, UDPPacket
Defined in:
lib/packetfu/protos/udp/mixin.rb

Overview

This Mixin simplifies access to the UDPHeaders. Mix this in with your packet interface, and it will add methods that essentially delegate to the ‘udp_header’ method (assuming that it is a UDPHeader object)

Instance Method Summary collapse

Instance Method Details

#udp_calc_lenObject



15
# File 'lib/packetfu/protos/udp/mixin.rb', line 15

def udp_calc_len; self.udp_header.udp_calc_len; end

#udp_dportObject



19
# File 'lib/packetfu/protos/udp/mixin.rb', line 19

def udp_dport; self.udp_header.udp_dport; end

#udp_dport=(v) ⇒ Object



20
# File 'lib/packetfu/protos/udp/mixin.rb', line 20

def udp_dport=(v); self.udp_header.udp_dport= v; end

#udp_dstObject



10
# File 'lib/packetfu/protos/udp/mixin.rb', line 10

def udp_dst; self.udp_header.udp_dst; end

#udp_dst=(v) ⇒ Object



9
# File 'lib/packetfu/protos/udp/mixin.rb', line 9

def udp_dst=(v); self.udp_header.udp_dst= v; end

#udp_lenObject



12
# File 'lib/packetfu/protos/udp/mixin.rb', line 12

def udp_len; self.udp_header.udp_len; end

#udp_len=(v) ⇒ Object



11
# File 'lib/packetfu/protos/udp/mixin.rb', line 11

def udp_len=(v); self.udp_header.udp_len= v; end

#udp_recalc(*v) ⇒ Object



16
# File 'lib/packetfu/protos/udp/mixin.rb', line 16

def udp_recalc(*v); self.udp_header.udp_recalc(*v); end

#udp_sportObject



17
# File 'lib/packetfu/protos/udp/mixin.rb', line 17

def udp_sport; self.udp_header.udp_sport; end

#udp_sport=(v) ⇒ Object



18
# File 'lib/packetfu/protos/udp/mixin.rb', line 18

def udp_sport=(v); self.udp_header.udp_sport= v; end

#udp_srcObject



8
# File 'lib/packetfu/protos/udp/mixin.rb', line 8

def udp_src; self.udp_header.udp_src; end

#udp_src=(v) ⇒ Object



7
# File 'lib/packetfu/protos/udp/mixin.rb', line 7

def udp_src=(v); self.udp_header.udp_src= v; end

#udp_sumObject



14
# File 'lib/packetfu/protos/udp/mixin.rb', line 14

def udp_sum; self.udp_header.udp_sum; end

#udp_sum=(v) ⇒ Object



13
# File 'lib/packetfu/protos/udp/mixin.rb', line 13

def udp_sum=(v); self.udp_header.udp_sum= v; end

#udp_sum_readableObject



21
# File 'lib/packetfu/protos/udp/mixin.rb', line 21

def udp_sum_readable; self.udp_header.udp_sum_readable; end