github.com/gopacket/gopacket@v1.1.0/pcap/defs_windows.go (about)

     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  
     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  
    11  package pcap
    12  
    13  import "syscall"
    14  
    15  const errorBufferSize = 0x100
    16  
    17  const (
    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  
    34  type timeval struct {
    35  	Sec  int32
    36  	Usec int32
    37  }
    38  type pcapPkthdr struct {
    39  	Ts     timeval
    40  	Caplen uint32
    41  	Len    uint32
    42  }
    43  type pcapTPtr uintptr
    44  type pcapBpfInstruction struct {
    45  	Code uint16
    46  	Jt   uint8
    47  	Jf   uint8
    48  	K    uint32
    49  }
    50  type pcapBpfProgram struct {
    51  	Len   uint32
    52  	Insns *pcapBpfInstruction
    53  }
    54  type pcapStats struct {
    55  	Recv   uint32
    56  	Drop   uint32
    57  	Ifdrop uint32
    58  }
    59  type pcapCint int32
    60  type pcapIf struct {
    61  	Next        *pcapIf
    62  	Name        *int8
    63  	Description *int8
    64  	Addresses   *pcapAddr
    65  	Flags       uint32
    66  }
    67  
    68  type pcapAddr struct {
    69  	Next      *pcapAddr
    70  	Addr      *syscall.RawSockaddr
    71  	Netmask   *syscall.RawSockaddr
    72  	Broadaddr *syscall.RawSockaddr
    73  	Dstaddr   *syscall.RawSockaddr
    74  }