Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- func RunningVersion() (version uint32, err error)
- func Uninstall() (err error)
- type Adapter
- type Packet
- type Session
- func (session Session) AllocateSendPacket(packetSize int) (packet []byte, err error)
- func (session Session) End()
- func (session Session) ReadWaitEvent() (handle windows.Handle)
- func (session Session) ReceivePacket() (packet []byte, err error)
- func (session Session) ReleaseReceivePacket(packet []byte)
- func (session Session) SendPacket(packet []byte)
Constants ¶
View Source
const ( PacketSizeMax = 0xffff // Maximum packet size RingCapacityMin = 0x20000 // Minimum ring capacity (128 kiB) RingCapacityMax = 0x4000000 // Maximum ring capacity (64 MiB) )
Variables ¶
This section is empty.
Functions ¶
func RunningVersion ¶
RunningVersion returns the version of the running Wintun driver.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func CreateAdapter ¶
func CreateAdapter(name string, tunnelType string, requestedGUID *windows.GUID) (wintun *Adapter, err error)
CreateAdapter creates a Wintun adapter. name is the cosmetic name of the adapter. tunnelType represents the type of adapter and should be "Wintun". requestedGUID is the GUID of the created network adapter, which then influences NLA generation deterministically. If it is set to nil, the GUID is chosen by the system at random, and hence a new NLA entry is created for each new adapter.
func OpenAdapter ¶
OpenAdapter opens an existing Wintun adapter by name.
type Packet ¶
type Packet struct { Next *Packet // Pointer to next packet in queue Size uint32 // Size of packet (max WINTUN_MAX_IP_PACKET_SIZE) Data *[PacketSizeMax]byte // Pointer to layer 3 IPv4 or IPv6 packet }
Packet with data
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (Session) AllocateSendPacket ¶
func (Session) ReadWaitEvent ¶
func (Session) ReceivePacket ¶
func (Session) ReleaseReceivePacket ¶
func (Session) SendPacket ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.