Documentation ¶
Index ¶
- Constants
- func BridgeByName(name string) (*netlink.Bridge, error)
- func ConvertEnvs(m map[string]string) []string
- func CopyFile(src, dst string) (err error)
- func CopyFileContents(src, dst string) (err error)
- func CreateDirectory(path string, perm os.FileMode)
- func CreateFile(file, content string)
- func DefaultNetMTU() (string, error)
- func EthtoolTXOff(name string) error
- func FileExists(filename string) bool
- func LinkContainerNS(nspath, containerName string) error
- func ReadFileContent(file string) ([]byte, error)
- type EthtoolValue
- type IFReqData
Constants ¶
const ( SIOCETHTOOL = 0x8946 // linux/sockios.h ETHTOOL_GTXCSUM = 0x00000016 // linux/ethtool.h ETHTOOL_STXCSUM = 0x00000017 // linux/ethtool.h IFNAMSIZ = 16 // linux/if.h )
Variables ¶
This section is empty.
Functions ¶
func ConvertEnvs ¶
convertEnvs convert env variables passed as a map to a list of them
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherwise, copy the file contents from src to dst.
func CopyFileContents ¶
copyFileContents copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file.
func CreateDirectory ¶
CreateDirectory creates a directory by a path with a mode/permission specified by perm. If directory exists, the function does not do anything.
func CreateFile ¶
func CreateFile(file, content string)
func DefaultNetMTU ¶
getDefaultDockerMTU gets the MTU of a docker0 bridge interface if fails to get the MTU of docker0, returns "1500"
func EthtoolTXOff ¶
EthtoolTXOff disables TX checksum offload on specified interface
func FileExists ¶
func LinkContainerNS ¶
linkContainerNS creates a symlink for containers network namespace so that it can be managed by iproute2 utility
func ReadFileContent ¶
Types ¶
type EthtoolValue ¶
linux/ethtool.h 'struct ethtool_value'