Documentation
¶
Overview ¶
Package p4rt implements p4runtime functions
Package p4rt implements p4runtime functions ¶
Package p4rt implements p4runtime functions ¶
Package p4rt implements p4runtime functions
Index ¶
- Constants
- func Init(target *tg.Target, dpMode string, portmap *pm.PortMap)
- func ProcessP4PipelineConfigOperation(req *v1.SetForwardingPipelineConfigRequest, ...) bool
- func ProcessP4WriteRequest(wreq *v1.WriteRequest, wres *v1.WriteResponse) bool
- func ProcessPacketIn(exp *v1.PacketIn) bool
- func ProcessPacketOutOperation(po *v1.PacketOut) bool
- func TearDown()
Constants ¶
View Source
const CtxTimeout = 3 * time.Second
CtxTimeout for contexts
View Source
const PktTimeout = 3 * time.Second
PktTimeout for receiving all packets
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init starts a P4Runtime client and runs go routines to send and receive stream channel messages from P4Runtime stream channel client
func ProcessP4PipelineConfigOperation ¶
func ProcessP4PipelineConfigOperation(req *v1.SetForwardingPipelineConfigRequest, res *v1.SetForwardingPipelineConfigResponse) bool
ProcessP4PipelineConfigOperation sends SetForwardingPipelineConfigRequest to switch
func ProcessP4WriteRequest ¶
func ProcessP4WriteRequest(wreq *v1.WriteRequest, wres *v1.WriteResponse) bool
ProcessP4WriteRequest sends the write request to switch
func ProcessPacketIn ¶
ProcessPacketIn verifies if the packet received is same as expected packet.
func ProcessPacketOutOperation ¶
ProcessPacketOutOperation sends packet to stream channel client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.