Guest User

Untitled

a guest
Oct 22nd, 2014
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1.     local offs = ETHERNET_HEADER_LENGTH
  2.     local ip_hdr = ffi.cast("ip_header_t*", pkt_data + offs)
  3.     offs = offs + bit.band(ip_hdr.ver_ihl, 0xf) * 4
  4.     local tcp_hdr = ffi.cast("tcp_header_t*", pkt_data + offs)
  5.     offs = offs + bit.rshift(bit.band(tcp_hdr.data_offset, 0xF0), 2)
Advertisement
Add Comment
Please, Sign In to add comment