defs_windows_amd64.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright 2019 The GoPacket Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license
  4. // that can be found in the LICENSE file in the root of the source
  5. // tree.
  6. // This file contains necessary structs/constants generated from libpcap headers with cgo -godefs
  7. // generated with: generate_defs.exe
  8. // DO NOT MODIFY
  9. package pcap
  10. import "syscall"
  11. const errorBufferSize = 0x100
  12. const (
  13. pcapErrorNotActivated = -0x3
  14. pcapErrorActivated = -0x4
  15. pcapWarningPromisc = 0x2
  16. pcapErrorNoSuchDevice = -0x5
  17. pcapErrorDenied = -0x8
  18. pcapErrorNotUp = -0x9
  19. pcapError = -0x1
  20. pcapWarning = 0x1
  21. pcapDIN = 0x1
  22. pcapDOUT = 0x2
  23. pcapDINOUT = 0x0
  24. pcapNetmaskUnknown = 0xffffffff
  25. pcapTstampPrecisionMicro = 0x0
  26. pcapTstampPrecisionNano = 0x1
  27. )
  28. type timeval struct {
  29. Sec int32
  30. Usec int32
  31. }
  32. type pcapPkthdr struct {
  33. Ts timeval
  34. Caplen uint32
  35. Len uint32
  36. }
  37. type pcapTPtr uintptr
  38. type pcapBpfInstruction struct {
  39. Code uint16
  40. Jt uint8
  41. Jf uint8
  42. K uint32
  43. }
  44. type pcapBpfProgram struct {
  45. Len uint32
  46. Pad_cgo_0 [4]byte
  47. Insns *pcapBpfInstruction
  48. }
  49. type pcapStats struct {
  50. Recv uint32
  51. Drop uint32
  52. Ifdrop uint32
  53. }
  54. type pcapCint int32
  55. type pcapIf struct {
  56. Next *pcapIf
  57. Name *int8
  58. Description *int8
  59. Addresses *pcapAddr
  60. Flags uint32
  61. Pad_cgo_0 [4]byte
  62. }
  63. type pcapAddr struct {
  64. Next *pcapAddr
  65. Addr *syscall.RawSockaddr
  66. Netmask *syscall.RawSockaddr
  67. Broadaddr *syscall.RawSockaddr
  68. Dstaddr *syscall.RawSockaddr
  69. }