Guest User

Untitled

a guest
Nov 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @[Link("pcap")]
  2. lib LibPcap
  3. # previous code ...
  4.  
  5. type PcapT = Void*
  6. alias UChar = UInt8
  7. alias BpfUInt32 = LibC::UInt
  8.  
  9. struct Timeval
  10. tv_sec : LibC::Long
  11. tv_usec : LibC::Long
  12. end
  13.  
  14. struct PcapPkthdr
  15. ts : Timeval
  16. caplen : BpfUInt32
  17. len : BpfUInt32
  18. end
  19.  
  20. fun pcap_open_live(device : LibC::Char*,
  21. snaplen : LibC::Int,
  22. promisc : LibC::Int,
  23. to_ms : LibC::Int,
  24. errbuf : LibC::Char*) : PcapT
  25.  
  26. fun pcap_next_ex(capture : PcapT, header : PcapPkthdr**, data : UChar**) : LibC::Int
  27. end
Add Comment
Please, Sign In to add comment