13
func (ti *testInterface) setBroadcast(suffix int) error {
14
ti.name = fmt.Sprintf("gotest%d", suffix)
15
xname, err := exec.LookPath("ip")
19
ti.setupCmds = append(ti.setupCmds, &exec.Cmd{
21
Args: []string{"ip", "link", "add", ti.name, "type", "dummy"},
23
ti.teardownCmds = append(ti.teardownCmds, &exec.Cmd{
25
Args: []string{"ip", "link", "delete", ti.name, "type", "dummy"},
30
func (ti *testInterface) setPointToPoint(suffix int, local, remote string) error {
31
ti.name = fmt.Sprintf("gotest%d", suffix)
34
xname, err := exec.LookPath("ip")
38
ti.setupCmds = append(ti.setupCmds, &exec.Cmd{
40
Args: []string{"ip", "tunnel", "add", ti.name, "mode", "gre", "local", local, "remote", remote},
42
ti.teardownCmds = append(ti.teardownCmds, &exec.Cmd{
44
Args: []string{"ip", "tunnel", "del", ti.name, "mode", "gre", "local", local, "remote", remote},
46
xname, err = exec.LookPath("ifconfig")
50
ti.setupCmds = append(ti.setupCmds, &exec.Cmd{
52
Args: []string{"ifconfig", ti.name, "inet", local, "dstaddr", remote},
10
58
numOfTestIPv4MCAddrs = 14