Skip to content

Commit 3ac8363

Browse files
committed
windows: add enums for IpAdapterUnicastAddress
These are for the enum fields in IpAdapterUnicastAddress.
1 parent bce4cf7 commit 3ac8363

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

windows/types_windows.go

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,50 @@ const (
20312031
IF_TYPE_IEEE1394 = 144
20322032
)
20332033

2034+
// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see
2035+
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin
2036+
const (
2037+
IpPrefixOriginOther = iota
2038+
IpPrefixOriginManual
2039+
IpPrefixOriginWellKnown
2040+
IpPrefixOriginDhcp
2041+
IpPrefixOriginRouterAdvertisement
2042+
IpPrefixOriginUnchanged = 1 << 4
2043+
)
2044+
2045+
// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see
2046+
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin
2047+
const (
2048+
NlsoOther = iota
2049+
NlsoManual
2050+
NlsoWellKnown
2051+
NlsoDhcp
2052+
NlsoLinkLayerAddress
2053+
NlsoRandom
2054+
IpSuffixOriginOther = iota
2055+
IpSuffixOriginManual
2056+
IpSuffixOriginWellKnown
2057+
IpSuffixOriginDhcp
2058+
IpSuffixOriginLinkLayerAddress
2059+
IpSuffixOriginRandom
2060+
IpSuffixOriginUnchanged = 1 << 4
2061+
)
2062+
2063+
// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see
2064+
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state
2065+
const (
2066+
NldsInvalid = iota
2067+
NldsTentative
2068+
NldsDuplicate
2069+
NldsDeprecated
2070+
NldsPreferred
2071+
IpDadStateInvalid = iota
2072+
IpDadStateTentative
2073+
IpDadStateDuplicate
2074+
IpDadStateDeprecated
2075+
IpDadStatePreferred
2076+
)
2077+
20342078
type SocketAddress struct {
20352079
Sockaddr *syscall.RawSockaddrAny
20362080
SockaddrLength int32

0 commit comments

Comments
 (0)