Exemple #1
0
func (b *BasicApplication) SendEchoReply(dpid string) {
	req := ofp10.NewEchoReply()
	s, ok := GetSwitch(dpid)
	if ok {
		<-time.After(time.Second * 1)
		s.Send(req)
	}
}
Exemple #2
0
func (o *OgoInstance) EchoRequest(dpid net.HardwareAddr) {
	// Wait three seconds then send an echo_reply message.
	go func() {
		<-time.After(time.Second * 3)
		if sw, ok := Switch(dpid); ok {
			res := ofp10.NewEchoReply()
			sw.Send(res)
		}
	}()
}