chore: make deps
This commit is contained in:
17
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
17
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -321,6 +321,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||
//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP
|
||||
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
|
||||
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
|
||||
//sys GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) = kernel32.GetNumberOfConsoleInputEvents
|
||||
//sys FlushConsoleInputBuffer(console Handle) (err error) = kernel32.FlushConsoleInputBuffer
|
||||
//sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole
|
||||
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
|
||||
//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
|
||||
@ -890,8 +892,12 @@ const socket_error = uintptr(^uint32(0))
|
||||
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
|
||||
//sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
|
||||
//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex
|
||||
//sys GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2
|
||||
//sys GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2
|
||||
//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry
|
||||
//sys FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable
|
||||
//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange
|
||||
//sys NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2
|
||||
//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange
|
||||
//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2
|
||||
|
||||
@ -914,6 +920,17 @@ type RawSockaddrInet6 struct {
|
||||
Scope_id uint32
|
||||
}
|
||||
|
||||
// RawSockaddrInet is a union that contains an IPv4, an IPv6 address, or an address family. See
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-sockaddr_inet.
|
||||
//
|
||||
// A [*RawSockaddrInet] may be converted to a [*RawSockaddrInet4] or [*RawSockaddrInet6] using
|
||||
// unsafe, depending on the address family.
|
||||
type RawSockaddrInet struct {
|
||||
Family uint16
|
||||
Port uint16
|
||||
Data [6]uint32
|
||||
}
|
||||
|
||||
type RawSockaddr struct {
|
||||
Family uint16
|
||||
Data [14]int8
|
||||
|
||||
92
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
92
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@ -65,6 +65,22 @@ var signals = [...]string{
|
||||
15: "terminated",
|
||||
}
|
||||
|
||||
// File flags for [os.OpenFile]. The O_ prefix is used to indicate
|
||||
// that these flags are specific to the OpenFile function.
|
||||
const (
|
||||
O_FILE_FLAG_OPEN_NO_RECALL = FILE_FLAG_OPEN_NO_RECALL
|
||||
O_FILE_FLAG_OPEN_REPARSE_POINT = FILE_FLAG_OPEN_REPARSE_POINT
|
||||
O_FILE_FLAG_SESSION_AWARE = FILE_FLAG_SESSION_AWARE
|
||||
O_FILE_FLAG_POSIX_SEMANTICS = FILE_FLAG_POSIX_SEMANTICS
|
||||
O_FILE_FLAG_BACKUP_SEMANTICS = FILE_FLAG_BACKUP_SEMANTICS
|
||||
O_FILE_FLAG_DELETE_ON_CLOSE = FILE_FLAG_DELETE_ON_CLOSE
|
||||
O_FILE_FLAG_SEQUENTIAL_SCAN = FILE_FLAG_SEQUENTIAL_SCAN
|
||||
O_FILE_FLAG_RANDOM_ACCESS = FILE_FLAG_RANDOM_ACCESS
|
||||
O_FILE_FLAG_NO_BUFFERING = FILE_FLAG_NO_BUFFERING
|
||||
O_FILE_FLAG_OVERLAPPED = FILE_FLAG_OVERLAPPED
|
||||
O_FILE_FLAG_WRITE_THROUGH = FILE_FLAG_WRITE_THROUGH
|
||||
)
|
||||
|
||||
const (
|
||||
FILE_READ_DATA = 0x00000001
|
||||
FILE_READ_ATTRIBUTES = 0x00000080
|
||||
@ -2304,6 +2320,82 @@ type MibIfRow2 struct {
|
||||
OutQLen uint64
|
||||
}
|
||||
|
||||
// IP_ADDRESS_PREFIX stores an IP address prefix. See
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix.
|
||||
type IpAddressPrefix struct {
|
||||
Prefix RawSockaddrInet
|
||||
PrefixLength uint8
|
||||
}
|
||||
|
||||
// NL_ROUTE_ORIGIN enumeration from nldef.h or
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_origin.
|
||||
const (
|
||||
NlroManual = 0
|
||||
NlroWellKnown = 1
|
||||
NlroDHCP = 2
|
||||
NlroRouterAdvertisement = 3
|
||||
Nlro6to4 = 4
|
||||
)
|
||||
|
||||
// NL_ROUTE_ORIGIN enumeration from nldef.h or
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_protocol.
|
||||
const (
|
||||
MIB_IPPROTO_OTHER = 1
|
||||
MIB_IPPROTO_LOCAL = 2
|
||||
MIB_IPPROTO_NETMGMT = 3
|
||||
MIB_IPPROTO_ICMP = 4
|
||||
MIB_IPPROTO_EGP = 5
|
||||
MIB_IPPROTO_GGP = 6
|
||||
MIB_IPPROTO_HELLO = 7
|
||||
MIB_IPPROTO_RIP = 8
|
||||
MIB_IPPROTO_IS_IS = 9
|
||||
MIB_IPPROTO_ES_IS = 10
|
||||
MIB_IPPROTO_CISCO = 11
|
||||
MIB_IPPROTO_BBN = 12
|
||||
MIB_IPPROTO_OSPF = 13
|
||||
MIB_IPPROTO_BGP = 14
|
||||
MIB_IPPROTO_IDPR = 15
|
||||
MIB_IPPROTO_EIGRP = 16
|
||||
MIB_IPPROTO_DVMRP = 17
|
||||
MIB_IPPROTO_RPL = 18
|
||||
MIB_IPPROTO_DHCP = 19
|
||||
MIB_IPPROTO_NT_AUTOSTATIC = 10002
|
||||
MIB_IPPROTO_NT_STATIC = 10006
|
||||
MIB_IPPROTO_NT_STATIC_NON_DOD = 10007
|
||||
)
|
||||
|
||||
// MIB_IPFORWARD_ROW2 stores information about an IP route entry. See
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_row2.
|
||||
type MibIpForwardRow2 struct {
|
||||
InterfaceLuid uint64
|
||||
InterfaceIndex uint32
|
||||
DestinationPrefix IpAddressPrefix
|
||||
NextHop RawSockaddrInet
|
||||
SitePrefixLength uint8
|
||||
ValidLifetime uint32
|
||||
PreferredLifetime uint32
|
||||
Metric uint32
|
||||
Protocol uint32
|
||||
Loopback uint8
|
||||
AutoconfigureAddress uint8
|
||||
Publish uint8
|
||||
Immortal uint8
|
||||
Age uint32
|
||||
Origin uint32
|
||||
}
|
||||
|
||||
// MIB_IPFORWARD_TABLE2 contains a table of IP route entries. See
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_table2.
|
||||
type MibIpForwardTable2 struct {
|
||||
NumEntries uint32
|
||||
Table [1]MibIpForwardRow2
|
||||
}
|
||||
|
||||
// Rows returns the IP route entries in the table.
|
||||
func (t *MibIpForwardTable2) Rows() []MibIpForwardRow2 {
|
||||
return unsafe.Slice(&t.Table[0], t.NumEntries)
|
||||
}
|
||||
|
||||
// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.
|
||||
type MibUnicastIpAddressRow struct {
|
||||
|
||||
55
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
55
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@ -182,13 +182,17 @@ var (
|
||||
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
|
||||
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
|
||||
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
|
||||
procFreeMibTable = modiphlpapi.NewProc("FreeMibTable")
|
||||
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
|
||||
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
|
||||
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
|
||||
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
|
||||
procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex")
|
||||
procGetIpForwardEntry2 = modiphlpapi.NewProc("GetIpForwardEntry2")
|
||||
procGetIpForwardTable2 = modiphlpapi.NewProc("GetIpForwardTable2")
|
||||
procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry")
|
||||
procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange")
|
||||
procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2")
|
||||
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
|
||||
procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
|
||||
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
|
||||
@ -238,6 +242,7 @@ var (
|
||||
procFindResourceW = modkernel32.NewProc("FindResourceW")
|
||||
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
|
||||
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
|
||||
procFlushConsoleInputBuffer = modkernel32.NewProc("FlushConsoleInputBuffer")
|
||||
procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
|
||||
procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
|
||||
procFormatMessageW = modkernel32.NewProc("FormatMessageW")
|
||||
@ -284,6 +289,7 @@ var (
|
||||
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
|
||||
procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
|
||||
procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId")
|
||||
procGetNumberOfConsoleInputEvents = modkernel32.NewProc("GetNumberOfConsoleInputEvents")
|
||||
procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
|
||||
procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
|
||||
procGetProcAddress = modkernel32.NewProc("GetProcAddress")
|
||||
@ -1622,6 +1628,11 @@ func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
|
||||
return
|
||||
}
|
||||
|
||||
func FreeMibTable(memory unsafe.Pointer) {
|
||||
syscall.SyscallN(procFreeMibTable.Addr(), uintptr(memory))
|
||||
return
|
||||
}
|
||||
|
||||
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
|
||||
r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
|
||||
if r0 != 0 {
|
||||
@ -1662,6 +1673,22 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
|
||||
return
|
||||
}
|
||||
|
||||
func GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) {
|
||||
r0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row)))
|
||||
if r0 != 0 {
|
||||
errcode = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) {
|
||||
r0, _, _ := syscall.SyscallN(procGetIpForwardTable2.Addr(), uintptr(family), uintptr(unsafe.Pointer(table)))
|
||||
if r0 != 0 {
|
||||
errcode = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
|
||||
r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
|
||||
if r0 != 0 {
|
||||
@ -1682,6 +1709,18 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa
|
||||
return
|
||||
}
|
||||
|
||||
func NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
|
||||
var _p0 uint32
|
||||
if initialNotification {
|
||||
_p0 = 1
|
||||
}
|
||||
r0, _, _ := syscall.SyscallN(procNotifyRouteChange2.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
|
||||
if r0 != 0 {
|
||||
errcode = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
|
||||
var _p0 uint32
|
||||
if initialNotification {
|
||||
@ -2111,6 +2150,14 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func FlushConsoleInputBuffer(console Handle) (err error) {
|
||||
r1, _, e1 := syscall.SyscallN(procFlushConsoleInputBuffer.Addr(), uintptr(console))
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func FlushFileBuffers(handle Handle) (err error) {
|
||||
r1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle))
|
||||
if r1 == 0 {
|
||||
@ -2481,6 +2528,14 @@ func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err erro
|
||||
return
|
||||
}
|
||||
|
||||
func GetNumberOfConsoleInputEvents(console Handle, numevents *uint32) (err error) {
|
||||
r1, _, e1 := syscall.SyscallN(procGetNumberOfConsoleInputEvents.Addr(), uintptr(console), uintptr(unsafe.Pointer(numevents)))
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
|
||||
var _p0 uint32
|
||||
if wait {
|
||||
|
||||
Reference in New Issue
Block a user