Documentation
¶
Index ¶
- type Client
- type ClientOption
- func WithBatchSize(batchSize uint32) ClientOption
- func WithDstIP(ip net.IP) ClientOption
- func WithDstMac(mac net.HardwareAddr) ClientOption
- func WithDstPort(port int) ClientOption
- func WithPPS(pps uint64) ClientOption
- func WithPacketSize(size int) ClientOption
- func WithParallel(parallel int) ClientOption
- func WithSrcIP(ip net.IP) ClientOption
- func WithSrcMac(mac net.HardwareAddr) ClientOption
- func WithSrcPort(port int) ClientOption
- func WithTx(tx bool) ClientOption
- type ClientParams
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Params ClientParams
// contains filtered or unexported fields
}
Client represents the Client.
type ClientOption ¶
type ClientOption func(*Client)
ClientOption defines a function that modifies the Xdperf parameters.
func WithBatchSize ¶
func WithBatchSize(batchSize uint32) ClientOption
WithBatchSize sets the batch size for sending packets.
func WithDstMac ¶
func WithDstMac(mac net.HardwareAddr) ClientOption
WithDstMac sets the destination MAC address.
func WithDstPort ¶
func WithDstPort(port int) ClientOption
WithDstPort sets the destination UDP port.
func WithPacketSize ¶
func WithPacketSize(size int) ClientOption
WithPacketSize sets the size of the packets to send.
func WithParallel ¶
func WithParallel(parallel int) ClientOption
WithParallel sets the number of parallel threads to use.
func WithSrcMac ¶
func WithSrcMac(mac net.HardwareAddr) ClientOption
WithSrcMac sets the source MAC address.
func WithTx ¶ added in v0.2.0
func WithTx(tx bool) ClientOption
WithTx sets the client to use XDP_TX mode instead of XDP_REDIRECT.
type ClientParams ¶
type ClientParams struct {
SrcIP net.IP
DstIP net.IP
SrcPort int
DstPort int
SrcMac net.HardwareAddr
DstMac net.HardwareAddr
PacketSize int
Parallel int
PPS uint64
BatchSize uint32
Tx bool
Device *net.Interface
}
ClientParams holds the parameters for the xdperf application.
Click to show internal directories.
Click to hide internal directories.