Documentation
¶
Rendered for windows/amd64
Index ¶
- Constants
- type AddressFamily
- type AllowedIP
- type ConfigBuilder
- func (builder *ConfigBuilder) AppendAllowedIP(allowedIP *AllowedIP)
- func (builder *ConfigBuilder) AppendInterface(interfaze *Interface)
- func (builder *ConfigBuilder) AppendPeer(peer *Peer)
- func (builder *ConfigBuilder) Interface() (*Interface, uint32)
- func (builder *ConfigBuilder) Preallocate(size uint32)
- type Interface
- type InterfaceFlag
- type Peer
- type PeerFlag
- type RawSockaddrInet
Constants ¶
View Source
const ( IoctlGet = 0xb098c506 IoctlSet = 0xb098c509 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressFamily ¶
type AddressFamily uint16
AddressFamily enumeration specifies protocol family and is one of the windows.AF_* constants.
type AllowedIP ¶
type AllowedIP struct {
Address [16]byte
AddressFamily AddressFamily
Cidr uint8
// contains filtered or unexported fields
}
func (*AllowedIP) NextAllowedIP ¶
type ConfigBuilder ¶
type ConfigBuilder struct {
// contains filtered or unexported fields
}
func (*ConfigBuilder) AppendAllowedIP ¶
func (builder *ConfigBuilder) AppendAllowedIP(allowedIP *AllowedIP)
func (*ConfigBuilder) AppendInterface ¶
func (builder *ConfigBuilder) AppendInterface(interfaze *Interface)
func (*ConfigBuilder) AppendPeer ¶
func (builder *ConfigBuilder) AppendPeer(peer *Peer)
func (*ConfigBuilder) Interface ¶
func (builder *ConfigBuilder) Interface() (*Interface, uint32)
func (*ConfigBuilder) Preallocate ¶
func (builder *ConfigBuilder) Preallocate(size uint32)
type Interface ¶
type Interface struct {
Flags InterfaceFlag
ListenPort uint16
PrivateKey [32]byte
PublicKey [32]byte
PeerCount uint32
// contains filtered or unexported fields
}
type InterfaceFlag ¶
type InterfaceFlag uint32
const ( InterfaceHasPublicKey InterfaceFlag = 1 << 0 InterfaceHasPrivateKey InterfaceFlag = 1 << 1 InterfaceHasListenPort InterfaceFlag = 1 << 2 InterfaceReplacePeers InterfaceFlag = 1 << 3 )
type Peer ¶
type Peer struct {
Flags PeerFlag
ProtocolVersion uint32
PublicKey [32]byte
PersistentKeepalive uint16
Endpoint RawSockaddrInet
TxBytes uint64
RxBytes uint64
LastHandshake uint64
AllowedIPsCount uint32
// contains filtered or unexported fields
}
func (*Peer) FirstAllowedIP ¶
type RawSockaddrInet ¶
type RawSockaddrInet struct {
Family AddressFamily
// contains filtered or unexported fields
}
RawSockaddrInet union contains an IPv4, an IPv6 address, or an address family. https://docs.microsoft.com/en-us/windows/desktop/api/ws2ipdef/ns-ws2ipdef-_sockaddr_inet
func (*RawSockaddrInet) IP ¶
func (addr *RawSockaddrInet) IP() net.IP
IP returns IPv4 or IPv6 address, or nil if the address is neither.
func (*RawSockaddrInet) Port ¶
func (addr *RawSockaddrInet) Port() uint16
Port returns the port if the address if IPv4 or IPv6, or 0 if neither.
Click to show internal directories.
Click to hide internal directories.