blob: 9619215903e0eea82b667c9a79f99cc95ca95005 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001// 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
7// This file contains necessary structs/constants generated from libpcap headers with cgo -godefs
8// generated with: generate_defs.exe
9// DO NOT MODIFY
10
11package pcap
12
13import "syscall"
14
15const errorBufferSize = 0x100
16
17const (
18 pcapErrorNotActivated = -0x3
19 pcapErrorActivated = -0x4
20 pcapWarningPromisc = 0x2
21 pcapErrorNoSuchDevice = -0x5
22 pcapErrorDenied = -0x8
23 pcapErrorNotUp = -0x9
24 pcapError = -0x1
25 pcapWarning = 0x1
26 pcapDIN = 0x1
27 pcapDOUT = 0x2
28 pcapDINOUT = 0x0
29 pcapNetmaskUnknown = 0xffffffff
30 pcapTstampPrecisionMicro = 0x0
31 pcapTstampPrecisionNano = 0x1
32)
33
34type timeval struct {
35 Sec int32
36 Usec int32
37}
38type pcapPkthdr struct {
39 Ts timeval
40 Caplen uint32
41 Len uint32
42}
43type pcapTPtr uintptr
44type pcapBpfInstruction struct {
45 Code uint16
46 Jt uint8
47 Jf uint8
48 K uint32
49}
50type pcapBpfProgram struct {
51 Len uint32
52 Pad_cgo_0 [4]byte
53 Insns *pcapBpfInstruction
54}
55type pcapStats struct {
56 Recv uint32
57 Drop uint32
58 Ifdrop uint32
59}
60type pcapCint int32
61type pcapIf struct {
62 Next *pcapIf
63 Name *int8
64 Description *int8
65 Addresses *pcapAddr
66 Flags uint32
67 Pad_cgo_0 [4]byte
68}
69
70type pcapAddr struct {
71 Next *pcapAddr
72 Addr *syscall.RawSockaddr
73 Netmask *syscall.RawSockaddr
74 Broadaddr *syscall.RawSockaddr
75 Dstaddr *syscall.RawSockaddr
76}