class Packetnom::Packet::Udp
Attributes
checksum[RW]
dest_port[RW]
dport[RW]
dst_port[RW]
len[RW]
length[RW]
source_port[RW]
Attributes
sport[RW]
Attributes
src_port[RW]
Attributes
sum[RW]
Public Class Methods
new( bytes )
click to toggle source
Initialize the packet
# File lib/packet/udp.rb, line 14 def initialize( bytes ) @src_port = bytes[34..35].join().to_i(16).to_s(10).to_i @dst_port = bytes[36..37].join().to_i(16).to_s(10).to_i @length = bytes[38..39].join().to_i(16).to_s(10).to_i @sum = bytes[40..41].join().to_i(16).to_s(10).to_i end