Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PcapReaderLoop ¶
func PcapReaderLoop()
func SetIpAddress ¶
func SetIpAddress()
Types ¶
type Vswitchdevice ¶
type Vswitchdevice struct { Realif *TapConn // this is a pointed to the syscall tap RAW connection // contains filtered or unexported fields }
Vswitchdevice describes the new TAP device to be created.
var VDev Vswitchdevice
This will represent the tap device when exported.
func (*Vswitchdevice) GetTapMac ¶
func (vd *Vswitchdevice) GetTapMac() string
GetTapMac returns mac address of the device we created
func (*Vswitchdevice) ReadFrameThread ¶
func (vd *Vswitchdevice) ReadFrameThread()
ReadFrameThread the thread which reads the frames from tap device. creates a TAP device with name specified as argument just do ; sudo ip addr add 10.1.0.10/24 dev <tapname> sudo ip link set dev <tapname> up ping -c1 -b 10.1.0.255
func (*Vswitchdevice) SetDeviceConf ¶
func (vd *Vswitchdevice) SetDeviceConf()
SetDeviceConf pupulates the switch with configuration taken from the config file.
func (*Vswitchdevice) WriteFrameThread ¶
func (vd *Vswitchdevice) WriteFrameThread()
WriteFrameThread writes a frame into the tap device.
Click to show internal directories.
Click to hide internal directories.