Documentation
¶
Index ¶
- Constants
- func AdditionalConfigFiles() []string
- func AdditionalLeaseFiles() []string
- func ConfTmpl(tmplText string, cfg *ctrld.Config) (string, error)
- func ConfTmplWithCacheDisabled(tmplText string, cfg *ctrld.Config, cacheDisabled bool) (string, error)
- func FirewallaConfTmpl(tmplText string, cfg *ctrld.Config) (string, error)
- func FirewallaSelfInterfaces() []*net.Interface
- func InterfaceNameFromConfig(filename string) (string, error)
- func UbiosConfPath() string
- func UbiosPidFile() string
- type Upstream
Constants ¶
const ( MerlinConfPath = "/tmp/etc/dnsmasq.conf" MerlinJffsConfDir = "/jffs/configs" MerlinJffsConfPath = "/jffs/configs/dnsmasq.conf" MerlinPostConfPath = "/jffs/scripts/dnsmasq.postconf" )
const ConfigContentTmpl = `` /* 209-byte string literal not displayed */
const CtrldMarker = `# GENERATED BY ctrld - DO NOT MODIFY`
const MerlinPostConfMarker = `# GENERATED BY ctrld - EOF`
const MerlinPostConfTmpl = `` /* 1228-byte string literal not displayed */
const (
UbiosConfName = "zzzctrld.conf"
)
Variables ¶
This section is empty.
Functions ¶
func AdditionalConfigFiles ¶ added in v1.4.5
func AdditionalConfigFiles() []string
AdditionalConfigFiles returns a list of Dnsmasq configuration files found in the "/tmp/etc" directory.
func AdditionalLeaseFiles ¶ added in v1.4.5
func AdditionalLeaseFiles() []string
AdditionalLeaseFiles returns a list of lease file paths corresponding to the Dnsmasq configuration files.
func ConfTmplWithCacheDisabled ¶ added in v1.3.4
func ConfTmplWithCacheDisabled(tmplText string, cfg *ctrld.Config, cacheDisabled bool) (string, error)
ConfTmplWithCacheDisabled is like ConfTmpl, but the caller can control whether dnsmasq cache is disabled using cacheDisabled parameter.
Generally, the caller should use ConfTmpl, but on some routers which dnsmasq config may be changed after ctrld started (like EdgeOS/Ubios, Firewalla ...), dnsmasq cache should not be disabled because the cache-size=0 generated by ctrld will conflict with router's generated config.
func FirewallaConfTmpl ¶
FirewallaConfTmpl generates dnsmasq config for Firewalla routers.
func FirewallaSelfInterfaces ¶
FirewallaSelfInterfaces returns list of interfaces that will be configured with default dnsmasq setup on Firewalla.
func InterfaceNameFromConfig ¶
func UbiosConfPath ¶ added in v1.4.5
func UbiosConfPath() string
UbiosConfPath returns the appropriate configuration path based on the system's directory structure.
func UbiosPidFile ¶ added in v1.4.5
func UbiosPidFile() string
UbiosPidFile returns the appropriate dnsmasq pid file based on the system's directory structure.