mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
a4befff533
Signed-off-by: Solomon Hykes <solomon@docker.com>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package daemon
|
|
|
|
import (
|
|
"github.com/docker/docker/daemon/networkdriver"
|
|
"net"
|
|
)
|
|
|
|
const (
|
|
defaultNetworkMtu = 1500
|
|
DisableNetworkBridge = "none"
|
|
)
|
|
|
|
// Config define the configuration of a docker daemon
|
|
// These are the configuration settings that you pass
|
|
// to the docker daemon when you launch it with say: `docker -d -e lxc`
|
|
// FIXME: separate runtime configuration from http api configuration
|
|
type Config struct {
|
|
Pidfile string
|
|
Root string
|
|
AutoRestart bool
|
|
Dns []string
|
|
DnsSearch []string
|
|
EnableIptables bool
|
|
EnableIpForward bool
|
|
DefaultIp net.IP
|
|
BridgeIface string
|
|
BridgeIP string
|
|
InterContainerCommunication bool
|
|
GraphDriver string
|
|
GraphOptions []string
|
|
ExecDriver string
|
|
Mtu int
|
|
DisableNetwork bool
|
|
EnableSelinuxSupport bool
|
|
Context map[string][]string
|
|
Sockets []string
|
|
}
|
|
|
|
func GetDefaultNetworkMtu() int {
|
|
if iface, err := networkdriver.GetDefaultRouteIface(); err == nil {
|
|
return iface.MTU
|
|
}
|
|
return defaultNetworkMtu
|
|
}
|