Add payload_data to TCP to only return the tcp payload and not the options
git-svn-id: file:///home/svn/framework3/trunk@6898 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
00b4c62bf1
commit
6ab7bee149
|
@ -105,6 +105,10 @@ class TCP < RacketPart
|
|||
self.offset = self.class.bit_length/32 + newpayload.length/4
|
||||
self.checksum!(ip_src, ip_dst)
|
||||
end
|
||||
|
||||
def payload_data
|
||||
self.payload[(self.offset * 4)-20, self.payload.length-((self.offset * 4)-20)] || ''
|
||||
end
|
||||
|
||||
def initialize(*args)
|
||||
@options = []
|
||||
|
|
Loading…
Reference in New Issue