Skip to content

Commit f2ce62c

Browse files
database64128gopherbot
authored andcommitted
windows: add constants for PMTUD socket options
Related documentation: - https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options - https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options Change-Id: I21b23ca815d1d8135ce5724115b9ca23819ea10a GitHub-Last-Rev: 9054c5c GitHub-Pull-Request: #245 Reviewed-on: https://go-review.googlesource.com/c/sys/+/654495 Reviewed-by: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
1 parent 74cfc93 commit f2ce62c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

windows/types_windows.go

+11
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ const (
10741074
IP_ADD_MEMBERSHIP = 0xc
10751075
IP_DROP_MEMBERSHIP = 0xd
10761076
IP_PKTINFO = 0x13
1077+
IP_MTU_DISCOVER = 0x47
10771078

10781079
IPV6_V6ONLY = 0x1b
10791080
IPV6_UNICAST_HOPS = 0x4
@@ -1083,6 +1084,7 @@ const (
10831084
IPV6_JOIN_GROUP = 0xc
10841085
IPV6_LEAVE_GROUP = 0xd
10851086
IPV6_PKTINFO = 0x13
1087+
IPV6_MTU_DISCOVER = 0x47
10861088

10871089
MSG_OOB = 0x1
10881090
MSG_PEEK = 0x2
@@ -1132,6 +1134,15 @@ const (
11321134
WSASYS_STATUS_LEN = 128
11331135
)
11341136

1137+
// enum PMTUD_STATE from ws2ipdef.h
1138+
const (
1139+
IP_PMTUDISC_NOT_SET = 0
1140+
IP_PMTUDISC_DO = 1
1141+
IP_PMTUDISC_DONT = 2
1142+
IP_PMTUDISC_PROBE = 3
1143+
IP_PMTUDISC_MAX = 4
1144+
)
1145+
11351146
type WSABuf struct {
11361147
Len uint32
11371148
Buf *byte

0 commit comments

Comments
 (0)