Add error message for ifname collision (#74)

* Add error message for ifname collision

This changes introduce to validateIfName, to check the validation
for interface name, i.e. same name among two or more interfaces.
This commit is contained in:
Tomofumi Hayashi
2018-05-09 15:33:44 +09:00
committed by GitHub
parent fcc4d67ddb
commit f0794119ba
2066 changed files with 693984 additions and 2 deletions

View File

@@ -0,0 +1,43 @@
// +build !linux
package netns
import (
"errors"
)
var (
ErrNotImplemented = errors.New("not implemented")
)
func Set(ns NsHandle) (err error) {
return ErrNotImplemented
}
func New() (ns NsHandle, err error) {
return -1, ErrNotImplemented
}
func Get() (NsHandle, error) {
return -1, ErrNotImplemented
}
func GetFromPath(path string) (NsHandle, error) {
return -1, ErrNotImplemented
}
func GetFromName(name string) (NsHandle, error) {
return -1, ErrNotImplemented
}
func GetFromPid(pid int) (NsHandle, error) {
return -1, ErrNotImplemented
}
func GetFromThread(pid, tid int) (NsHandle, error) {
return -1, ErrNotImplemented
}
func GetFromDocker(id string) (NsHandle, error) {
return -1, ErrNotImplemented
}