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:
HD Moore 2009-07-25 14:11:13 +00:00
parent 00b4c62bf1
commit 6ab7bee149
1 changed files with 4 additions and 0 deletions

View File

@ -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 = []