Documentation
¶
Overview ¶
Package apple is the lifecycle behind the C ABI in bridge/apple: an Apple NetworkExtension provider prepares a configuration, applies the returned settings to the system, then starts the engine on the utun descriptor the system gave it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NetworkChanged ¶
func NetworkChanged(h int32)
func Start ¶
Start runs the engine for a prepared handle on dev, which the engine owns from here on. A failed start keeps the handle until Stop.
Types ¶
type Prefix ¶
type Prefix struct {
Address string `json:"address"`
Mask string `json:"mask,omitempty"`
Bits int `json:"bits"`
}
Prefix carries both spellings: IPv4 settings want Mask, IPv6 want Bits.
type Settings ¶
type Settings struct {
MTU int `json:"mtu"`
IPv4Addresses []Prefix `json:"ipv4Addresses"`
IPv4Routes []Prefix `json:"ipv4Routes"`
IPv6Addresses []Prefix `json:"ipv6Addresses"`
IPv6Routes []Prefix `json:"ipv6Routes"`
// DNSServers and DNSSearch feed NEDNSSettings, which the provider
// applies system-wide.
DNSServers []string `json:"dnsServers"`
DNSSearch []string `json:"dnsSearch"`
}
Settings is what the provider hands to setTunnelNetworkSettings, split by family the way NEIPv4Settings and NEIPv6Settings take it.
Click to show internal directories.
Click to hide internal directories.