Пример #1
0
func NewSetConfig(xid uint32) openflow.SetConfig {
	return &SetConfig{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_SET_CONFIG, xid),
		Config: Config{
			flags:          OFPC_FRAG_NORMAL,
			missSendLength: 0xFFFF,
		},
	}
}
Пример #2
0
func NewFlowMod(xid uint32, cmd uint16) openflow.FlowMod {
	// Default out_port value is OFPP_NONE (OFPP_ANY)
	outPort := openflow.NewOutPort()
	outPort.SetNone()

	return &FlowMod{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_FLOW_MOD, xid),
		command: cmd,
		outPort: outPort,
	}
}
Пример #3
0
func NewEchoReply(xid uint32) openflow.EchoReply {
	return &openflow.BaseEcho{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_ECHO_REPLY, xid),
	}
}
Пример #4
0
func NewEchoRequest(xid uint32) openflow.EchoRequest {
	return &openflow.BaseEcho{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_ECHO_REQUEST, xid),
	}
}
Пример #5
0
func NewDescRequest(xid uint32) openflow.DescRequest {
	return &DescRequest{
		Message: openflow.NewMessage(openflow.OF13_VERSION, OFPT_MULTIPART_REQUEST, xid),
	}
}
Пример #6
0
func NewFeaturesRequest(xid uint32) openflow.FeaturesRequest {
	return &FeaturesRequest{
		Message: openflow.NewMessage(openflow.OF13_VERSION, OFPT_FEATURES_REQUEST, xid),
	}
}
Пример #7
0
func NewQueueGetConfigRequest(xid uint32) openflow.QueueGetConfigRequest {
	return &QueueGetConfigRequest{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_QUEUE_GET_CONFIG_REQUEST, xid),
	}
}
Пример #8
0
func NewPacketOut(xid uint32) openflow.PacketOut {
	return &PacketOut{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_PACKET_OUT, xid),
	}
}
Пример #9
0
func NewHello(xid uint32) openflow.Hello {
	return &openflow.BaseHello{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_HELLO, xid),
	}
}
Пример #10
0
func NewDescRequest(xid uint32) openflow.DescRequest {
	return &DescRequest{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_STATS_REQUEST, xid),
	}
}
Пример #11
0
func NewFlowStatsRequest(xid uint32) openflow.FlowStatsRequest {
	return &FlowStatsRequest{
		Message: openflow.NewMessage(openflow.OF10_VERSION, OFPT_STATS_REQUEST, xid),
	}
}
Пример #12
0
func NewGetConfigRequest(xid uint32) openflow.GetConfigRequest {
	return &GetConfigRequest{
		Message: openflow.NewMessage(openflow.OF13_VERSION, OFPT_GET_CONFIG_REQUEST, xid),
	}
}
Пример #13
0
func NewBarrierRequest(xid uint32) openflow.BarrierRequest {
	return &BarrierRequest{
		Message: openflow.NewMessage(openflow.OF13_VERSION, OFPT_BARRIER_REQUEST, xid),
	}
}
Пример #14
0
func NewTableFeaturesRequest(xid uint32) openflow.TableFeaturesRequest {
	return &TableFeaturesRequest{
		Message: openflow.NewMessage(openflow.OF13_VERSION, OFPT_MULTIPART_REQUEST, xid),
	}
}