1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd netbsd openbsd
16 func (ti
*testInterface
) setBroadcast(vid
int) error
{
17 if runtime
.GOOS
== "openbsd" {
18 ti
.name
= fmt
.Sprintf("vether%d", vid
)
20 ti
.name
= fmt
.Sprintf("vlan%d", vid
)
22 xname
, err
:= exec
.LookPath("ifconfig")
26 ti
.setupCmds
= append(ti
.setupCmds
, &exec
.Cmd
{
28 Args
: []string{"ifconfig", ti
.name
, "create"},
30 ti
.teardownCmds
= append(ti
.teardownCmds
, &exec
.Cmd
{
32 Args
: []string{"ifconfig", ti
.name
, "destroy"},
37 func (ti
*testInterface
) setPointToPoint(suffix
int) error
{
38 ti
.name
= fmt
.Sprintf("gif%d", suffix
)
39 xname
, err
:= exec
.LookPath("ifconfig")
43 ti
.setupCmds
= append(ti
.setupCmds
, &exec
.Cmd
{
45 Args
: []string{"ifconfig", ti
.name
, "create"},
47 ti
.setupCmds
= append(ti
.setupCmds
, &exec
.Cmd
{
49 Args
: []string{"ifconfig", ti
.name
, "inet", ti
.local
, ti
.remote
},
51 ti
.teardownCmds
= append(ti
.teardownCmds
, &exec
.Cmd
{
53 Args
: []string{"ifconfig", ti
.name
, "destroy"},
58 func (ti
*testInterface
) setLinkLocal(suffix
int) error
{
59 return errors
.New("not yet implemented for BSD")