golang.zx2c4.com/wireguard/windows@v0.5.4-0.20230123132234-dcc0eb72a04b/tunnel/firewall/types_windows_64.go (about)

     1  //go:build amd64 || arm64
     2  
     3  /* SPDX-License-Identifier: MIT
     4   *
     5   * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
     6   */
     7  
     8  package firewall
     9  
    10  import "golang.org/x/sys/windows"
    11  
    12  const (
    13  	wtFwpByteBlob_Size        = 16
    14  	wtFwpByteBlob_data_Offset = 8
    15  
    16  	wtFwpConditionValue0_Size         = 16
    17  	wtFwpConditionValue0_uint8_Offset = 8
    18  
    19  	wtFwpmDisplayData0_Size               = 16
    20  	wtFwpmDisplayData0_description_Offset = 8
    21  
    22  	wtFwpmFilter0_Size                       = 200
    23  	wtFwpmFilter0_displayData_Offset         = 16
    24  	wtFwpmFilter0_flags_Offset               = 32
    25  	wtFwpmFilter0_providerKey_Offset         = 40
    26  	wtFwpmFilter0_providerData_Offset        = 48
    27  	wtFwpmFilter0_layerKey_Offset            = 64
    28  	wtFwpmFilter0_subLayerKey_Offset         = 80
    29  	wtFwpmFilter0_weight_Offset              = 96
    30  	wtFwpmFilter0_numFilterConditions_Offset = 112
    31  	wtFwpmFilter0_filterCondition_Offset     = 120
    32  	wtFwpmFilter0_action_Offset              = 128
    33  	wtFwpmFilter0_providerContextKey_Offset  = 152
    34  	wtFwpmFilter0_reserved_Offset            = 168
    35  	wtFwpmFilter0_filterID_Offset            = 176
    36  	wtFwpmFilter0_effectiveWeight_Offset     = 184
    37  
    38  	wtFwpmFilterCondition0_Size                  = 40
    39  	wtFwpmFilterCondition0_matchType_Offset      = 16
    40  	wtFwpmFilterCondition0_conditionValue_Offset = 24
    41  
    42  	wtFwpmSession0_Size                        = 72
    43  	wtFwpmSession0_displayData_Offset          = 16
    44  	wtFwpmSession0_flags_Offset                = 32
    45  	wtFwpmSession0_txnWaitTimeoutInMSec_Offset = 36
    46  	wtFwpmSession0_processId_Offset            = 40
    47  	wtFwpmSession0_sid_Offset                  = 48
    48  	wtFwpmSession0_username_Offset             = 56
    49  	wtFwpmSession0_kernelMode_Offset           = 64
    50  
    51  	wtFwpmSublayer0_Size                = 72
    52  	wtFwpmSublayer0_displayData_Offset  = 16
    53  	wtFwpmSublayer0_flags_Offset        = 32
    54  	wtFwpmSublayer0_providerKey_Offset  = 40
    55  	wtFwpmSublayer0_providerData_Offset = 48
    56  	wtFwpmSublayer0_weight_Offset       = 64
    57  
    58  	wtFwpProvider0_Size                = 64
    59  	wtFwpProvider0_displayData_Offset  = 16
    60  	wtFwpProvider0_flags_Offset        = 32
    61  	wtFwpProvider0_providerData_Offset = 40
    62  	wtFwpProvider0_serviceName_Offset  = 56
    63  
    64  	wtFwpValue0_Size         = 16
    65  	wtFwpValue0_value_Offset = 8
    66  )
    67  
    68  // FWPM_FILTER0 defined in fwpmtypes.h
    69  // (https://docs.microsoft.com/en-us/windows/desktop/api/fwpmtypes/ns-fwpmtypes-fwpm_filter0).
    70  type wtFwpmFilter0 struct {
    71  	filterKey           windows.GUID // Windows type: GUID
    72  	displayData         wtFwpmDisplayData0
    73  	flags               wtFwpmFilterFlags // Windows type: UINT32
    74  	providerKey         *windows.GUID     // Windows type: *GUID
    75  	providerData        wtFwpByteBlob
    76  	layerKey            windows.GUID // Windows type: GUID
    77  	subLayerKey         windows.GUID // Windows type: GUID
    78  	weight              wtFwpValue0
    79  	numFilterConditions uint32
    80  	filterCondition     *wtFwpmFilterCondition0
    81  	action              wtFwpmAction0
    82  	offset1             [4]byte       // Layout correction field
    83  	providerContextKey  windows.GUID  // Windows type: GUID
    84  	reserved            *windows.GUID // Windows type: *GUID
    85  	filterID            uint64
    86  	effectiveWeight     wtFwpValue0
    87  }