Skip to content

Commit

Permalink
Added HV Socket known IDs, Dial, bug fixes
Browse files Browse the repository at this point in the history
Added:
* Well-know Hyper-V VMIDs for parents, children, and loopback.
* VSock interop service GUID.
* `Dial()` and `DialContext()` to dial a specific Hyper-V socket at a
  known address (along with a corresponding `HvsockDialer` struct.

Bug fixes:
* Dial (and Listen) now properly initialize and set properties of their
  sockets after ConnectEx (and AcceptEx).
* The `socketError` used by `bind` was incorrect, it should be `int32(-1)`,
  not `uintptr(^0)`

Created a `sockets` package, currently only with syscalls to `Bind`,
`ConnectEx` and `GetSockName`, bypassing `syscall/windows` restrictions
on the types that can do so.

Upgraded to go v1.17 to use `unsafe.Slice()`.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Mar 23, 2022
1 parent dfd7da8 commit 05bbdb1
Show file tree
Hide file tree
Showing 8 changed files with 574 additions and 34 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -9,6 +9,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17.0'
- run: go test -gcflags=all=-d=checkptr -v ./...

build:
Expand All @@ -17,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15.0'
go-version: '^1.17.0'

- run: go build ./pkg/etw/sample/
- run: go build ./tools/etw-provider-gen/
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
@@ -1 +1,3 @@
*.exe
.vscode/

*.exe
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/Microsoft/go-winio

go 1.13
go 1.17

require (
github.com/sirupsen/logrus v1.7.0
Expand Down

0 comments on commit 05bbdb1

Please sign in to comment.