Documentation ¶
Overview ¶
Package ondatra represents the public Ondatra testing API.
Index ¶
- Constants
- func ATEs(t testing.TB) map[string]*ATEDevice
- func DUTs(t testing.TB) map[string]*DUTDevice
- func Debug() *debug.Debug
- func EventListener() *eventlis.EventListener
- func Report() *report.Report
- func ReservationID(t testing.TB) string
- func RunTests(m *testing.M, newBindFn func() (binding.Binding, error))
- type ATEDevice
- type ATETopology
- func (at *ATETopology) AddInterface(name string) *Interface
- func (at *ATETopology) AddLAG(name string) *LAG
- func (at *ATETopology) ClearInterfaces() *ATETopology
- func (at *ATETopology) Interfaces() map[string]*Interface
- func (at *ATETopology) Push(t testing.TB) *ATETopology
- func (at *ATETopology) StartProtocols(t testing.TB) *ATETopology
- func (at *ATETopology) StopProtocols(t testing.TB) *ATETopology
- func (at *ATETopology) String() string
- func (at *ATETopology) Update(t testing.TB)
- func (at *ATETopology) UpdateBGPPeerStates(t testing.TB)
- func (at *ATETopology) UpdateNetworks(t testing.TB)
- type Actions
- type BGPGracefulRestart
- type BGPPeerNotification
- func (n *BGPPeerNotification) Send(t testing.TB)
- func (n *BGPPeerNotification) String() string
- func (n *BGPPeerNotification) WithCode(code int) *BGPPeerNotification
- func (n *BGPPeerNotification) WithPeers(bgpPeers ...*ixnet.BGPPeer) *BGPPeerNotification
- func (n *BGPPeerNotification) WithSubCode(subCode int) *BGPPeerNotification
- type Config
- type DUTDevice
- type Device
- func (d *Device) CustomData(key string) any
- func (d *Device) GNMIOpts() *gnmi.Opts
- func (d *Device) ID() string
- func (d *Device) Model() string
- func (d *Device) Name() string
- func (d *Device) Port(t testing.TB, ID string) *Port
- func (d *Device) Ports() []*Port
- func (d *Device) String() string
- func (d *Device) Vendor() Vendor
- func (d *Device) Version() string
- type ESPHeader
- type ESPOverMACSecHeader
- type EgressTracking
- type Endpoint
- type EthernetHeader
- func (h *EthernetHeader) DstAddressRange() *ixnet.AddressRange
- func (h *EthernetHeader) SrcAddressRange() *ixnet.AddressRange
- func (h *EthernetHeader) WithBadCRC(bad bool) *EthernetHeader
- func (h *EthernetHeader) WithDstAddress(addr string) *EthernetHeader
- func (h *EthernetHeader) WithEtherType(etherType uint32) *EthernetHeader
- func (h *EthernetHeader) WithSrcAddress(addr string) *EthernetHeader
- func (h *EthernetHeader) WithVLANID(vid uint16) *EthernetHeader
- type Flow
- func (f *Flow) EgressTracking() *EgressTracking
- func (f *Flow) FrameSizeIMIXCustom() *IMIXCustom
- func (f *Flow) Headers() []Header
- func (f *Flow) Name() string
- func (f *Flow) String() string
- func (f *Flow) Transmission() *Transmission
- func (f *Flow) WithConvergenceTracking(enable bool) *Flow
- func (f *Flow) WithDstEndpoints(eps ...Endpoint) *Flow
- func (f *Flow) WithFrameRateBPS(n uint64) *Flow
- func (f *Flow) WithFrameRateFPS(n uint64) *Flow
- func (f *Flow) WithFrameRatePct(pct float64) *Flow
- func (f *Flow) WithFrameSize(n uint32) *Flow
- func (f *Flow) WithFrameSizeIMIXCisco() *Flow
- func (f *Flow) WithFrameSizeIMIXDefault() *Flow
- func (f *Flow) WithFrameSizeIMIXIPSec() *Flow
- func (f *Flow) WithFrameSizeIMIXIPv6() *Flow
- func (f *Flow) WithFrameSizeIMIXRPRQuadmodal() *Flow
- func (f *Flow) WithFrameSizeIMIXRPRTrimodal() *Flow
- func (f *Flow) WithFrameSizeIMIXStandard() *Flow
- func (f *Flow) WithFrameSizeIMIXTCP() *Flow
- func (f *Flow) WithFrameSizeIMIXTolly() *Flow
- func (f *Flow) WithFrameSizeRandom(min, max uint32) *Flow
- func (f *Flow) WithHeaders(headers ...Header) *Flow
- func (f *Flow) WithIngressTrackingByDstEndpoint(enable bool) *Flow
- func (f *Flow) WithIngressTrackingByDstIPV4(enable bool) *Flow
- func (f *Flow) WithIngressTrackingByDstIPV6(enable bool) *Flow
- func (f *Flow) WithIngressTrackingByMplsLabel(enable bool) *Flow
- func (f *Flow) WithIngressTrackingByPorts(enable bool) *Flow
- func (f *Flow) WithIngressTrackingBySrcEndpoint(enable bool) *Flow
- func (f *Flow) WithIngressTrackingBySrcIPV4(enable bool) *Flow
- func (f *Flow) WithIngressTrackingBySrcIPV6(enable bool) *Flow
- func (f *Flow) WithIngressTrackingByVLANID(enable bool) *Flow
- func (f *Flow) WithSrcEndpoints(eps ...Endpoint) *Flow
- type GREHeader
- type HTTPHeader
- type Header
- type ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithFragmentationRequired() *ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithHostUnreachable() *ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithNetworkUnreachable() *ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithPortUnreachable() *ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithProtocolUnreachable() *ICMPDestinationUnreachable
- func (h *ICMPDestinationUnreachable) WithSourceRouteFailed() *ICMPDestinationUnreachable
- type ICMPEchoReply
- type ICMPEchoRequest
- type ICMPHeader
- func (h *ICMPHeader) DestinationUnreachable() *ICMPDestinationUnreachable
- func (h *ICMPHeader) EchoReply() *ICMPEchoReply
- func (h *ICMPHeader) EchoRequest() *ICMPEchoRequest
- func (h *ICMPHeader) ParameterProblem() *ICMPParameterProblem
- func (h *ICMPHeader) RedirectMessage() *ICMPRedirectMessage
- func (h *ICMPHeader) TimeExceeded() *ICMPTimeExceeded
- func (h *ICMPHeader) Timestamp() *ICMPTimestamp
- func (h *ICMPHeader) TimestampReply() *ICMPTimestampReply
- type ICMPParameterProblem
- type ICMPRedirectMessage
- func (h *ICMPRedirectMessage) WithForHost() *ICMPRedirectMessage
- func (h *ICMPRedirectMessage) WithForNetwork() *ICMPRedirectMessage
- func (h *ICMPRedirectMessage) WithForToSAndHost() *ICMPRedirectMessage
- func (h *ICMPRedirectMessage) WithForToSAndNetwork() *ICMPRedirectMessage
- func (h *ICMPRedirectMessage) WithIP(ip string) *ICMPRedirectMessage
- type ICMPTimeExceeded
- type ICMPTimestamp
- type ICMPTimestampReply
- func (h *ICMPTimestampReply) WithID(id uint32) *ICMPTimestampReply
- func (h *ICMPTimestampReply) WithOriginateTimestamp(ts uint32) *ICMPTimestampReply
- func (h *ICMPTimestampReply) WithReceiveTimestamp(ts uint32) *ICMPTimestampReply
- func (h *ICMPTimestampReply) WithSeq(seq uint32) *ICMPTimestampReply
- func (h *ICMPTimestampReply) WithTransmitTimestamp(ts uint32) *ICMPTimestampReply
- type IMIXCustom
- type IPv4Header
- func (h *IPv4Header) DstAddressRange() *ixnet.AddressRange
- func (h *IPv4Header) SrcAddressRange() *ixnet.AddressRange
- func (h *IPv4Header) WithDSCP(dscp uint8) *IPv4Header
- func (h *IPv4Header) WithDontFragment(dontFragment bool) *IPv4Header
- func (h *IPv4Header) WithDstAddress(addr string) *IPv4Header
- func (h *IPv4Header) WithECN(ecn uint8) *IPv4Header
- func (h *IPv4Header) WithFragmentOffset(fragmentOffset int) *IPv4Header
- func (h *IPv4Header) WithHeaderChecksum(checksum uint16) *IPv4Header
- func (h *IPv4Header) WithIdentification(identification int) *IPv4Header
- func (h *IPv4Header) WithMoreFragments(moreFragments bool) *IPv4Header
- func (h *IPv4Header) WithProtocol(protocol int) *IPv4Header
- func (h *IPv4Header) WithSrcAddress(addr string) *IPv4Header
- func (h *IPv4Header) WithTTL(ttl uint8) *IPv4Header
- type IPv6Header
- func (h *IPv6Header) DstAddressRange() *ixnet.AddressRange
- func (h *IPv6Header) FlowLabelRange() *ixnet.UIntRange
- func (h *IPv6Header) SrcAddressRange() *ixnet.AddressRange
- func (h *IPv6Header) WithDSCP(dscp uint8) *IPv6Header
- func (h *IPv6Header) WithDstAddress(addr string) *IPv6Header
- func (h *IPv6Header) WithECN(ecn uint8) *IPv6Header
- func (h *IPv6Header) WithFlowLabel(flowLabel uint32) *IPv6Header
- func (h *IPv6Header) WithHopLimit(hopLimit uint8) *IPv6Header
- func (h *IPv6Header) WithSrcAddress(addr string) *IPv6Header
- type Interface
- func (i *Interface) AddNetwork(name string) *ixnet.Network
- func (i *Interface) AddRSVP(name string) *ixnet.RSVP
- func (i *Interface) BGP() *ixnet.BGP
- func (i *Interface) ClearNetworks() *Interface
- func (i *Interface) DHCPV6Client() *ixnet.DHCPV6Client
- func (i *Interface) DHCPV6Server() *ixnet.DHCPV6Server
- func (i *Interface) EndpointPB() *opb.Flow_Endpoint
- func (i *Interface) Ethernet() *ixnet.Ethernet
- func (i *Interface) IPv4() *ixnet.IP
- func (i *Interface) IPv6() *ixnet.IP
- func (i *Interface) ISIS() *ixnet.ISIS
- func (i *Interface) IsLACPEnabled() bool
- func (i *Interface) Networks() map[string]*ixnet.Network
- func (i *Interface) WithIPv4Loopback(ipv4LoopbackCIDR string) *Interface
- func (i *Interface) WithIPv6Loopback(ipv6LoopbackCIDR string) *Interface
- func (i *Interface) WithLACPEnabled(enabled bool) *Interface
- func (i *Interface) WithLAG(l *LAG) *Interface
- func (i *Interface) WithPort(p *Port) *Interface
- type LACP
- type LAG
- type LDPHeader
- type LDPHello
- type MACsecHeader
- type MPLSHeader
- type OSPFAdvertisement
- type OSPFDatabaseDescription
- func (h *OSPFDatabaseDescription) WithInitial(initial bool) *OSPFDatabaseDescription
- func (h *OSPFDatabaseDescription) WithMTU(mtu uint32) *OSPFDatabaseDescription
- func (h *OSPFDatabaseDescription) WithMaster(master bool) *OSPFDatabaseDescription
- func (h *OSPFDatabaseDescription) WithMore(more bool) *OSPFDatabaseDescription
- func (h *OSPFDatabaseDescription) WithSeq(seq uint32) *OSPFDatabaseDescription
- type OSPFHeader
- type OSPFHello
- func (h *OSPFHello) WithBackupDesignatedRouter(ip string) *OSPFHello
- func (h *OSPFHello) WithDesignatedRouter(ip string) *OSPFHello
- func (h *OSPFHello) WithHelloIntervalSec(secs uint32) *OSPFHello
- func (h *OSPFHello) WithNeighbors(ips ...string) *OSPFHello
- func (h *OSPFHello) WithNetworkMaskLength(length uint32) *OSPFHello
- func (h *OSPFHello) WithRouterDeadIntervalSec(secs uint32) *OSPFHello
- func (h *OSPFHello) WithRouterPriority(prio uint32) *OSPFHello
- type OSPFLinkStateAck
- type OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithAdvertisingRouter(id string) *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithAge(sec uint32) *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateID(id string) *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeASExternal() *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeNetwork() *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeRouter() *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryASBR() *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateAdvertisementHeader
- func (h *OSPFLinkStateAdvertisementHeader) WithSeq(seq uint32) *OSPFLinkStateAdvertisementHeader
- type OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithAdvertisingRouter(id string) *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateID(id string) *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateTypeASExternal() *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateTypeNetwork() *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateTypeRouter() *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryASBR() *OSPFLinkStateRequest
- func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateRequest
- type OSPFLinkStateUpdate
- type PIMHeader
- type PIMHello
- type PMD
- type Port
- type RSVPHeader
- type SetLACPState
- type SetPortState
- type Speed
- type TCPHeader
- type Topology
- type Traffic
- type Transmission
- func (t *Transmission) WithInterburstGapBytes(bytes uint32) *Transmission
- func (t *Transmission) WithInterburstGapNanoseconds(nanoseconds uint32) *Transmission
- func (t *Transmission) WithMinGapBytes(minPacketGapBytes uint32) *Transmission
- func (t *Transmission) WithPacketsPerBurst(packetsPerBurst uint32) *Transmission
- func (t *Transmission) WithPatternBurst() *Transmission
- func (t *Transmission) WithPatternContinuous() *Transmission
- func (t *Transmission) WithPatternFixedDuration(secs uint32) *Transmission
- func (t *Transmission) WithPatternFixedPacketCount(packetsCount uint32) *Transmission
- type UDPHeader
- type Vendor
Constants ¶
const ( // ARISTA vendor. ARISTA = Vendor(opb.Device_ARISTA) // CISCO vendor. CISCO = Vendor(opb.Device_CISCO) // DELL vendor. DELL = Vendor(opb.Device_DELL) // JUNIPER vendor. JUNIPER = Vendor(opb.Device_JUNIPER) // IXIA vendor. IXIA = Vendor(opb.Device_IXIA) // CIENA vendor. CIENA = Vendor(opb.Device_CIENA) // OPENCONFIG vendor. OPENCONFIG = Vendor(opb.Device_OPENCONFIG) // PALOALTO vendor. PALOALTO = Vendor(opb.Device_PALOALTO) // ZPE vendor. ZPE = Vendor(opb.Device_ZPE) // NOKIA vendor. NOKIA = Vendor(opb.Device_NOKIA) // ARUBA vendor. ARUBA = Vendor(opb.Device_ARUBA) )
const ( // Speed1Gb is a port speed of 1Gbps. Speed1Gb = Speed(opb.Port_S_1GB) // Speed5Gb is a port speed of 5Gbps. Speed5Gb = Speed(opb.Port_S_5GB) // Speed10Gb is a port speed of 10Gbps. Speed10Gb = Speed(opb.Port_S_10GB) // Speed100Gb is a port speed of 100Gbps. Speed100Gb = Speed(opb.Port_S_100GB) // Speed400Gb is a port speed of 400Gbps. Speed400Gb = Speed(opb.Port_S_400GB) )
const ( // PMD10GBASELRM is the PMD 10GBASE-LRM PMD10GBASELRM = PMD(opb.Port_PMD_10GBASE_LRM) // PMD10GBASELR is the PMD 10GBASE-LR. PMD10GBASELR = PMD(opb.Port_PMD_10GBASE_LR) // PMD10GBASEZR is the PMD 10GBASE-ZR. PMD10GBASEZR = PMD(opb.Port_PMD_10GBASE_ZR) // PMD10GBASEER is the PMD 10GBASE-ER. PMD10GBASEER = PMD(opb.Port_PMD_10GBASE_ER) // PMD10GBASESR is the PMD 10GBASE-SR. PMD10GBASESR = PMD(opb.Port_PMD_10GBASE_SR) // PMD40GBASECR4 is the PMD 40GBASE-CR4. PMD40GBASECR4 = PMD(opb.Port_PMD_40GBASE_CR4) // PMD40GBASESR4 is the PMD 40GBASE-SR4. PMD40GBASESR4 = PMD(opb.Port_PMD_40GBASE_SR4) // PMD40GBASELR4 is the PMD 40GBASE-LR4. PMD40GBASELR4 = PMD(opb.Port_PMD_40GBASE_LR4) // PMD40GBASEER4 is the PMD 40GBASE-ER4. PMD40GBASEER4 = PMD(opb.Port_PMD_40GBASE_ER4) // PMD40GBASEPSM4 is the PMD 40GBASE-PSM4. PMD40GBASEPSM4 = PMD(opb.Port_PMD_40GBASE_PSM4) // PMD4X10GBASELR is the PMD 4X10GBASE-LR. PMD4X10GBASELR = PMD(opb.Port_PMD_4X10GBASE_LR) // PMD4X10GBASESR is the PMD 4X10GBASE-SR. PMD4X10GBASESR = PMD(opb.Port_PMD_4X10GBASE_SR) // PMD100GAOC is the PMD 100G-AOC. PMD100GAOC = PMD(opb.Port_PMD_100G_AOC) // PMD100GACC is the PMD 100G-ACC. PMD100GACC = PMD(opb.Port_PMD_100G_ACC) // PMD100GBASESR10 is the PMD 100GBASE-SR10. PMD100GBASESR10 = PMD(opb.Port_PMD_100GBASE_SR10) // PMD100GBASESR4 is the PMD 100GBASE-SR4. PMD100GBASESR4 = PMD(opb.Port_PMD_100GBASE_SR4) // PMD100GBASELR4 is the PMD 100GBASE-LR4. PMD100GBASELR4 = PMD(opb.Port_PMD_100GBASE_LR4) // PMD100GBASEER4 is the PMD 100GBASE-ER4. PMD100GBASEER4 = PMD(opb.Port_PMD_100GBASE_ER4) // PMD100GBASECWDM4 is the PMD 100GBASE-CWDM4. PMD100GBASECWDM4 = PMD(opb.Port_PMD_100GBASE_CWDM4) // PMD100GBASECLR4 is the PMD 100GBASE-CLR4. PMD100GBASECLR4 = PMD(opb.Port_PMD_100GBASE_CLR4) // PMD100GBASEPSM4 is the PMD 100GBASE-PSM4. PMD100GBASEPSM4 = PMD(opb.Port_PMD_100GBASE_PSM4) // PMD100GBASECR4 is the PMD 100GBASE-CR4. PMD100GBASECR4 = PMD(opb.Port_PMD_100GBASE_CR4) // PMD100GBASEFR is the PMD 100GBASE-FR. PMD100GBASEFR = PMD(opb.Port_PMD_100GBASE_FR) // PMD400GBASEZR is the PMD 400GBASE-ZR. PMD400GBASEZR = PMD(opb.Port_PMD_400GBASE_ZR) // PMD400GBASELR4 is the PMD 400GBASE-LR4. PMD400GBASELR4 = PMD(opb.Port_PMD_400GBASE_LR4) // PMD400GBASEFR4 is the PMD 400GBASE-FR4. PMD400GBASEFR4 = PMD(opb.Port_PMD_400GBASE_FR4) // PMD400GBASELR8 is the PMD 400GBASE-LR8. PMD400GBASELR8 = PMD(opb.Port_PMD_400GBASE_LR8) // PMD400GBASEDR4 is the PMD 400GBASE-DR4. PMD400GBASEDR4 = PMD(opb.Port_PMD_400GBASE_DR4) )
Variables ¶
This section is empty.
Functions ¶
func EventListener ¶ added in v0.1.2
func EventListener() *eventlis.EventListener
EventListener returns the Ondatra Event Listener API.
func ReservationID ¶
ReservationID returns the reservation ID for the testbed.
Types ¶
type ATEDevice ¶
type ATEDevice struct { *Device // contains filtered or unexported fields }
ATEDevice is an automated test equipment.
type ATETopology ¶
type ATETopology struct {
// contains filtered or unexported fields
}
ATETopology is an ATE topology.
func (*ATETopology) AddInterface ¶
func (at *ATETopology) AddInterface(name string) *Interface
AddInterface adds and returns an interface with the specified name. The returned interface has an Ethernet configuration with the following defaults: MTU: 1500 FEC: enabled
func (*ATETopology) AddLAG ¶
func (at *ATETopology) AddLAG(name string) *LAG
AddLAG adds and returns a new LAG. By default the LAG has LACP enabled.
func (*ATETopology) ClearInterfaces ¶
func (at *ATETopology) ClearInterfaces() *ATETopology
ClearInterfaces clear interfaces from the ATE topology.
func (*ATETopology) Interfaces ¶
func (at *ATETopology) Interfaces() map[string]*Interface
Interfaces returns a map of interface names to interfaces.
func (*ATETopology) Push ¶
func (at *ATETopology) Push(t testing.TB) *ATETopology
Push replaces the topology to the ATE with this one. Currently running protocols will stop.
func (*ATETopology) StartProtocols ¶
func (at *ATETopology) StartProtocols(t testing.TB) *ATETopology
StartProtocols starts the control plane protocols on the ATE.
func (*ATETopology) StopProtocols ¶
func (at *ATETopology) StopProtocols(t testing.TB) *ATETopology
StopProtocols stops the control plane protocols on the ATE.
func (*ATETopology) String ¶
func (at *ATETopology) String() string
func (*ATETopology) Update ¶
func (at *ATETopology) Update(t testing.TB)
Update updates the topology on the ATE to this one. Currently running protocols will continue running.
func (*ATETopology) UpdateBGPPeerStates ¶
func (at *ATETopology) UpdateBGPPeerStates(t testing.TB)
UpdateBGPPeerStates is equivalent to Update() but only updates the BGP peer state. This is provided as a temporary workaround for the high overhead of Update(). TODO(team): Remove this method once new Ixia config binding is used.
func (*ATETopology) UpdateNetworks ¶
func (at *ATETopology) UpdateNetworks(t testing.TB)
UpdateNetworks is equivalent to Update() but only updates the Network config on the fly.
type Actions ¶
type Actions struct {
// contains filtered or unexported fields
}
Actions is the ATE Actions API.
func (*Actions) NewBGPGracefulRestart ¶
func (a *Actions) NewBGPGracefulRestart() *BGPGracefulRestart
NewBGPGracefulRestart returns a new BGPGracefulRestart action.
func (*Actions) NewBGPPeerNotification ¶
func (a *Actions) NewBGPPeerNotification() *BGPPeerNotification
NewBGPPeerNotification returns a new BGPPeerNotification action. The action is configured by default with a code and sub code of 1.
func (*Actions) NewSetLACPState ¶
func (a *Actions) NewSetLACPState() *SetLACPState
NewSetLACPState returns a new SetLACPState action.
func (*Actions) NewSetPortState ¶
func (a *Actions) NewSetPortState() *SetPortState
NewSetPortState returns a new SetPortState action.
type BGPGracefulRestart ¶
type BGPGracefulRestart struct {
// contains filtered or unexported fields
}
BGPGracefulRestart is an action to trigger a BGP graceful restart event.
func (*BGPGracefulRestart) Send ¶
func (r *BGPGracefulRestart) Send(t testing.TB)
Send executes the operation to start the graceful restart event.
func (*BGPGracefulRestart) String ¶
func (r *BGPGracefulRestart) String() string
func (*BGPGracefulRestart) WithPeers ¶
func (r *BGPGracefulRestart) WithPeers(bgpPeers ...*ixnet.BGPPeer) *BGPGracefulRestart
WithPeers sets the BGP peers from which the graceful restart is to be sent.
func (*BGPGracefulRestart) WithRestartTime ¶
func (r *BGPGracefulRestart) WithRestartTime(delay time.Duration) *BGPGracefulRestart
WithRestartTime sets the delay for the BGP sessions to remain down before restarting.
type BGPPeerNotification ¶
type BGPPeerNotification struct {
// contains filtered or unexported fields
}
BGPPeerNotification is an action to send BGP notification and error codes.
func (*BGPPeerNotification) Send ¶
func (n *BGPPeerNotification) Send(t testing.TB)
Send executes the operation to send notification/error codes.
func (*BGPPeerNotification) String ¶
func (n *BGPPeerNotification) String() string
func (*BGPPeerNotification) WithCode ¶
func (n *BGPPeerNotification) WithCode(code int) *BGPPeerNotification
WithCode sets the code of the notification to be sent from the BGP peers.
func (*BGPPeerNotification) WithPeers ¶
func (n *BGPPeerNotification) WithPeers(bgpPeers ...*ixnet.BGPPeer) *BGPPeerNotification
WithPeers sets the BGP peers from which the notification is to be sent.
func (*BGPPeerNotification) WithSubCode ¶
func (n *BGPPeerNotification) WithSubCode(subCode int) *BGPPeerNotification
WithSubCode sets the sub code of the notification to be sent from the BGP peers.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the DUT configuration API.
func (*Config) New ¶
func (c *Config) New() *config.VendorConfig
New returns an empty DUT configuration.
type DUTDevice ¶
type DUTDevice struct {
*Device
}
DUTDevice is a device under test.
func (*DUTDevice) Operations ¶
func (d *DUTDevice) Operations() *operations.Operations
Operations returns a handle to the DUT operations API.
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device represents a network device.
func (*Device) CustomData ¶ added in v0.1.1
CustomData returns custom data for the specified key.
type ESPHeader ¶ added in v0.1.11
type ESPHeader struct {
// contains filtered or unexported fields
}
ESPHeader is an ESP packet header.
func (*ESPHeader) WithSecurityParametersIndex ¶ added in v0.1.11
WithSecurityParametersIndex sets the SPI of the ESP header.
func (*ESPHeader) WithSequenceNumber ¶ added in v0.1.11
WithSequenceNumber sets the sequence number of the ESP header.
type ESPOverMACSecHeader ¶ added in v0.1.11
type ESPOverMACSecHeader struct {
// contains filtered or unexported fields
}
ESPOverMACSecHeader is an ESP-over-MACSec packet header.
func NewESPOverMACSec ¶ added in v0.1.11
func NewESPOverMACSec() *ESPOverMACSecHeader
NewESPOverMACSec returns a new ESP-over-MACSec header.
func (*ESPOverMACSecHeader) SequenceNumberRange ¶ added in v0.1.11
func (h *ESPOverMACSecHeader) SequenceNumberRange() *ixnet.UIntRange
SequenceNumberRange sets the sequence number of the ESP-over-MACSec header to a range of values (defaulting to 1) and returns the range.
func (*ESPOverMACSecHeader) WithSecurityParametersIndex ¶ added in v0.1.11
func (h *ESPOverMACSecHeader) WithSecurityParametersIndex(spi uint32) *ESPOverMACSecHeader
WithSecurityParametersIndex sets the SPI of the ESP-over-MAC header.
func (*ESPOverMACSecHeader) WithSequenceNumber ¶ added in v0.1.11
func (h *ESPOverMACSecHeader) WithSequenceNumber(sn uint32) *ESPOverMACSecHeader
WithSequenceNumber sets the sequence number of the ESP-over-MACSec header.
type EgressTracking ¶
type EgressTracking struct {
// contains filtered or unexported fields
}
EgressTracking represents the egress tracking configuration of a flow.
func (*EgressTracking) WithCount ¶
func (et *EgressTracking) WithCount(count uint32) *EgressTracking
WithCount sets the number of unique values to egress track.
func (*EgressTracking) WithEnabled ¶
func (et *EgressTracking) WithEnabled(enabled bool) *EgressTracking
WithEnabled sets whether egress tracking is enabled.
func (*EgressTracking) WithOffset ¶
func (et *EgressTracking) WithOffset(offset uint32) *EgressTracking
WithOffset sets the egress tracking bit offset.
func (*EgressTracking) WithWidth ¶
func (et *EgressTracking) WithWidth(width uint32) *EgressTracking
WithWidth sets the egress tracking bit width.
type Endpoint ¶
type Endpoint interface {
EndpointPB() *opb.Flow_Endpoint
}
Endpoint is a potential source or destination of a flow. There are two types of endpoints: Interfaces and Networks.
type EthernetHeader ¶
type EthernetHeader struct {
// contains filtered or unexported fields
}
EthernetHeader is an Ethernet packet header.
func NewEthernetHeader ¶
func NewEthernetHeader() *EthernetHeader
NewEthernetHeader returns a new Ethernet header. The header is initialized with none of its properties specified. Unless specified, a best effort will be made to infer the VLAN ID and src and dst addresses from the topology.
func (*EthernetHeader) DstAddressRange ¶
func (h *EthernetHeader) DstAddressRange() *ixnet.AddressRange
DstAddressRange returns the range of destination addresses of the Ethernet header for further configuration. By default, the range will be nonrandom values in the interval ["00:00:00:00:00:01", "FF:FF:FF:FF:FF:FF"). The count of values in the range is not set by default; the user must set it explicitly.
func (*EthernetHeader) SrcAddressRange ¶
func (h *EthernetHeader) SrcAddressRange() *ixnet.AddressRange
SrcAddressRange returns the range of source addresses of the Ethernet header for further configuration. By default, the range will be nonrandom values in the interval ["00:00:00:00:00:01", "FF:FF:FF:FF:FF:FF"). The count of values in the range is not set by default; the user must set it explicitly.
func (*EthernetHeader) WithBadCRC ¶
func (h *EthernetHeader) WithBadCRC(bad bool) *EthernetHeader
WithBadCRC set whether the Ethernet header has an incorrect CRC in the frame check sequence.
func (*EthernetHeader) WithDstAddress ¶
func (h *EthernetHeader) WithDstAddress(addr string) *EthernetHeader
WithDstAddress sets the destination MAC address of the Ethernet header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.
func (*EthernetHeader) WithEtherType ¶
func (h *EthernetHeader) WithEtherType(etherType uint32) *EthernetHeader
WithEtherType sets the EtherType of the Ethernet header to the specified value.
func (*EthernetHeader) WithSrcAddress ¶
func (h *EthernetHeader) WithSrcAddress(addr string) *EthernetHeader
WithSrcAddress sets the source MAC address of the Ethernet header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.
func (*EthernetHeader) WithVLANID ¶
func (h *EthernetHeader) WithVLANID(vid uint16) *EthernetHeader
WithVLANID sets the 12-bit VLAN ID of the Ethernet header to the specified value.
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
Flow is an representation of a flow that is to be configured on the ATE.
func (*Flow) EgressTracking ¶
func (f *Flow) EgressTracking() *EgressTracking
EgressTracking returns the egress tracking configuration of the flow. By default the configuration has the following properties: enabled: true offset: 32 width: 3 count: 8
func (*Flow) FrameSizeIMIXCustom ¶
func (f *Flow) FrameSizeIMIXCustom() *IMIXCustom
FrameSizeIMIXCustom configures this IMIX to use custom size and weight pairs.
func (*Flow) Transmission ¶
func (f *Flow) Transmission() *Transmission
Transmission returns the transmission configuration for this flow. By default the transmission will have the following properties: pattern: continuous min packet gap: 12 bytes.
func (*Flow) WithConvergenceTracking ¶
WithConvergenceTracking enables convergence tracking for the flow.
func (*Flow) WithDstEndpoints ¶
WithDstEndpoints sets the flow's destination to the specified endpoints.
func (*Flow) WithFrameRateBPS ¶
WithFrameRateBPS sets the flow's rate to be n bits per second.
func (*Flow) WithFrameRateFPS ¶
WithFrameRateFPS sets the flow's rate to be n frames per second.
func (*Flow) WithFrameRatePct ¶
WithFrameRatePct sets the flow's rate to be pct% of the line rate.
func (*Flow) WithFrameSize ¶
WithFrameSize sets the frame size for this flow to a fixed value. To generate a range of frame sizes, use FrameSizeRange() instead.
func (*Flow) WithFrameSizeIMIXCisco ¶
WithFrameSizeIMIXCisco configures this IMIX to use the Cisco preset (64:7, 594:4 and 1518:1).
func (*Flow) WithFrameSizeIMIXDefault ¶
WithFrameSizeIMIXDefault configures this IMIX to use the default preset (64:7, 570:4, and 1518:1).
func (*Flow) WithFrameSizeIMIXIPSec ¶
WithFrameSizeIMIXIPSec configures this IMIX to use the IPSec preset (90:58.67, 92:2, 594:23.66 and 1418:15.67).
func (*Flow) WithFrameSizeIMIXIPv6 ¶
WithFrameSizeIMIXIPv6 configures this IMIX to use the IPv6 IMIX preset (60:58.67, 496:2, 594:23.66 and 1518:15.67).
func (*Flow) WithFrameSizeIMIXRPRQuadmodal ¶
WithFrameSizeIMIXRPRQuadmodal configures this IMIX to use the RPR Quadmodal preset (64:50, 512:15, 1518:15 and 9216:20).
func (*Flow) WithFrameSizeIMIXRPRTrimodal ¶
WithFrameSizeIMIXRPRTrimodal configures this IMIX to use the RPR Trimodal preset (64:60, 512:20 and 1518:20).
func (*Flow) WithFrameSizeIMIXStandard ¶
WithFrameSizeIMIXStandard configures this IMIX to use the Standard preset (58:58.67, 62:2, 594:23.66 and 1518:15.67).
func (*Flow) WithFrameSizeIMIXTCP ¶
WithFrameSizeIMIXTCP configures this IMIX to use the TCP preset (90:58.67, 92:2, 594:23.66 and 1518:15.67).
func (*Flow) WithFrameSizeIMIXTolly ¶
WithFrameSizeIMIXTolly configures this IMIX to use the Tolly preset (64:55, 78:5, 576:17 and 1518:23).
func (*Flow) WithFrameSizeRandom ¶
WithFrameSizeRandom sets the frame size for this flow to a random value in the given range.
func (*Flow) WithHeaders ¶
WithHeaders sets the flow's packet headers.
func (*Flow) WithIngressTrackingByDstEndpoint ¶
WithIngressTrackingByDstEndpoint enables ingress tracking by destination endpoint.
func (*Flow) WithIngressTrackingByDstIPV4 ¶
WithIngressTrackingByDstIPV4 enables ingress tracking by dst ipv4.
func (*Flow) WithIngressTrackingByDstIPV6 ¶
WithIngressTrackingByDstIPV6 enables ingress tracking by dst ipv6.
func (*Flow) WithIngressTrackingByMplsLabel ¶
WithIngressTrackingByMplsLabel enables ingress tracking by mpls label.
func (*Flow) WithIngressTrackingByPorts ¶
WithIngressTrackingByPorts enables ingress tracking by rx/tx ports.
func (*Flow) WithIngressTrackingBySrcEndpoint ¶
WithIngressTrackingBySrcEndpoint enables ingress tracking by source endpoint.
func (*Flow) WithIngressTrackingBySrcIPV4 ¶
WithIngressTrackingBySrcIPV4 enables ingress tracking by src ipv4.
func (*Flow) WithIngressTrackingBySrcIPV6 ¶
WithIngressTrackingBySrcIPV6 enables ingress tracking by src ipv6.
func (*Flow) WithIngressTrackingByVLANID ¶
WithIngressTrackingByVLANID enables ingress tracking by VLAN ID.
func (*Flow) WithSrcEndpoints ¶
WithSrcEndpoints sets the flow's source to the specified endpoints.
type GREHeader ¶
type GREHeader struct {
// contains filtered or unexported fields
}
GREHeader is a Generic Route Encapsulation packet header.
func NewGREHeader ¶
func NewGREHeader() *GREHeader
NewGREHeader returns a new GRE header. The header is initialized with none of its properties specified.
func (*GREHeader) WithSequenceNumber ¶
WithSequenceNumber sets sequence number of the GRE header.
type HTTPHeader ¶
type HTTPHeader struct {
// contains filtered or unexported fields
}
HTTPHeader is an HTTP packet header.
func NewHTTPHeader ¶
func NewHTTPHeader() *HTTPHeader
NewHTTPHeader returns a new HTTP header. The header is initialized with none of its properties specified.
type Header ¶
type Header interface {
// contains filtered or unexported methods
}
Header is a packet header.
type ICMPDestinationUnreachable ¶
type ICMPDestinationUnreachable struct {
// contains filtered or unexported fields
}
ICMPDestinationUnreachable is an ICMP destination unreachable message.
func (*ICMPDestinationUnreachable) WithFragmentationRequired ¶
func (h *ICMPDestinationUnreachable) WithFragmentationRequired() *ICMPDestinationUnreachable
WithFragmentationRequired sets the destination unreachable code to fragmentation required.
func (*ICMPDestinationUnreachable) WithHostUnreachable ¶
func (h *ICMPDestinationUnreachable) WithHostUnreachable() *ICMPDestinationUnreachable
WithHostUnreachable sets the destination unreachable code to host unreachable.
func (*ICMPDestinationUnreachable) WithNetworkUnreachable ¶
func (h *ICMPDestinationUnreachable) WithNetworkUnreachable() *ICMPDestinationUnreachable
WithNetworkUnreachable sets the destination unreachable code to network unreachable.
func (*ICMPDestinationUnreachable) WithPortUnreachable ¶
func (h *ICMPDestinationUnreachable) WithPortUnreachable() *ICMPDestinationUnreachable
WithPortUnreachable sets the destination unreachable code to port unreachable.
func (*ICMPDestinationUnreachable) WithProtocolUnreachable ¶
func (h *ICMPDestinationUnreachable) WithProtocolUnreachable() *ICMPDestinationUnreachable
WithProtocolUnreachable sets the destination unreachable code to protocol unreachable.
func (*ICMPDestinationUnreachable) WithSourceRouteFailed ¶
func (h *ICMPDestinationUnreachable) WithSourceRouteFailed() *ICMPDestinationUnreachable
WithSourceRouteFailed sets the destination unreachable code to source route failed.
type ICMPEchoReply ¶
type ICMPEchoReply struct {
// contains filtered or unexported fields
}
ICMPEchoReply is an ICMP echo reply message.
type ICMPEchoRequest ¶
type ICMPEchoRequest struct {
// contains filtered or unexported fields
}
ICMPEchoRequest is an ICMP echo request message.
type ICMPHeader ¶
type ICMPHeader struct {
// contains filtered or unexported fields
}
ICMPHeader is an ICMP packet header.
func NewICMPHeader ¶
func NewICMPHeader() *ICMPHeader
NewICMPHeader returns a new ICMP header. The header is initialized as an Echo Reply.
func (*ICMPHeader) DestinationUnreachable ¶
func (h *ICMPHeader) DestinationUnreachable() *ICMPDestinationUnreachable
DestinationUnreachable sets the ICMPHeader message type to destination unreachable.
func (*ICMPHeader) EchoReply ¶
func (h *ICMPHeader) EchoReply() *ICMPEchoReply
EchoReply sets the ICMPHeader message type to echo reply.
func (*ICMPHeader) EchoRequest ¶
func (h *ICMPHeader) EchoRequest() *ICMPEchoRequest
EchoRequest sets the ICMPHeader message type to echo request.
func (*ICMPHeader) ParameterProblem ¶
func (h *ICMPHeader) ParameterProblem() *ICMPParameterProblem
ParameterProblem sets the ICMPHeader message type to parameter problem.
func (*ICMPHeader) RedirectMessage ¶
func (h *ICMPHeader) RedirectMessage() *ICMPRedirectMessage
RedirectMessage sets the ICMPHeader message type to redirect message.
func (*ICMPHeader) TimeExceeded ¶
func (h *ICMPHeader) TimeExceeded() *ICMPTimeExceeded
TimeExceeded sets the ICMPHeader message type to time exceeded.
func (*ICMPHeader) Timestamp ¶
func (h *ICMPHeader) Timestamp() *ICMPTimestamp
Timestamp sets the ICMPHeader message type to timestamp message.
func (*ICMPHeader) TimestampReply ¶
func (h *ICMPHeader) TimestampReply() *ICMPTimestampReply
TimestampReply sets the ICMPHeader message type to timestamp reply.
type ICMPParameterProblem ¶
type ICMPParameterProblem struct {
// contains filtered or unexported fields
}
ICMPParameterProblem is an ICMP parameter problem message.
func (*ICMPParameterProblem) WithPointer ¶
func (h *ICMPParameterProblem) WithPointer(pointer uint32) *ICMPParameterProblem
WithPointer sets the pointer for the parameter problem message.
type ICMPRedirectMessage ¶
type ICMPRedirectMessage struct {
// contains filtered or unexported fields
}
ICMPRedirectMessage is an ICMP redirect message.
func (*ICMPRedirectMessage) WithForHost ¶
func (h *ICMPRedirectMessage) WithForHost() *ICMPRedirectMessage
WithForHost sets the redirect message code to redirect for host.
func (*ICMPRedirectMessage) WithForNetwork ¶
func (h *ICMPRedirectMessage) WithForNetwork() *ICMPRedirectMessage
WithForNetwork sets the redirect message code to redirect for network.
func (*ICMPRedirectMessage) WithForToSAndHost ¶
func (h *ICMPRedirectMessage) WithForToSAndHost() *ICMPRedirectMessage
WithForToSAndHost sets the redirect message code to redirect for ToS and host.
func (*ICMPRedirectMessage) WithForToSAndNetwork ¶
func (h *ICMPRedirectMessage) WithForToSAndNetwork() *ICMPRedirectMessage
WithForToSAndNetwork sets the redirect message code to redirect for ToS and network.
func (*ICMPRedirectMessage) WithIP ¶
func (h *ICMPRedirectMessage) WithIP(ip string) *ICMPRedirectMessage
WithIP sets the redirect gateway IP address.
type ICMPTimeExceeded ¶
type ICMPTimeExceeded struct {
// contains filtered or unexported fields
}
ICMPTimeExceeded is an ICMP time exceeded message.
func (*ICMPTimeExceeded) WithFragmentReassembly ¶
func (h *ICMPTimeExceeded) WithFragmentReassembly() *ICMPTimeExceeded
WithFragmentReassembly sets the time exceeded message code to time exceeded in fragment reassembly.
func (*ICMPTimeExceeded) WithTransit ¶
func (h *ICMPTimeExceeded) WithTransit() *ICMPTimeExceeded
WithTransit sets the time exceeded message code to time exceeded in transit.
type ICMPTimestamp ¶
type ICMPTimestamp struct {
// contains filtered or unexported fields
}
ICMPTimestamp is an ICMP timestamp message.
func (*ICMPTimestamp) WithID ¶
func (h *ICMPTimestamp) WithID(id uint32) *ICMPTimestamp
WithID sets the ID for the timestamp message.
func (*ICMPTimestamp) WithOriginateTimestamp ¶
func (h *ICMPTimestamp) WithOriginateTimestamp(ts uint32) *ICMPTimestamp
WithOriginateTimestamp sets the originate timestamp for the timestamp message.
func (*ICMPTimestamp) WithSeq ¶
func (h *ICMPTimestamp) WithSeq(seq uint32) *ICMPTimestamp
WithSeq sets the sequence number for the timestamp message.
type ICMPTimestampReply ¶
type ICMPTimestampReply struct {
// contains filtered or unexported fields
}
ICMPTimestampReply is an ICMP timestamp reply message.
func (*ICMPTimestampReply) WithID ¶
func (h *ICMPTimestampReply) WithID(id uint32) *ICMPTimestampReply
WithID sets the ID for the timestamp reply message.
func (*ICMPTimestampReply) WithOriginateTimestamp ¶
func (h *ICMPTimestampReply) WithOriginateTimestamp(ts uint32) *ICMPTimestampReply
WithOriginateTimestamp sets the originate timestamp for the timestamp reply message.
func (*ICMPTimestampReply) WithReceiveTimestamp ¶
func (h *ICMPTimestampReply) WithReceiveTimestamp(ts uint32) *ICMPTimestampReply
WithReceiveTimestamp sets the receive timestamp for the timestamp reply message.
func (*ICMPTimestampReply) WithSeq ¶
func (h *ICMPTimestampReply) WithSeq(seq uint32) *ICMPTimestampReply
WithSeq sets the sequence number for the timestamp reply message.
func (*ICMPTimestampReply) WithTransmitTimestamp ¶
func (h *ICMPTimestampReply) WithTransmitTimestamp(ts uint32) *ICMPTimestampReply
WithTransmitTimestamp sets the transmit timestamp for the timestamp reply message.
type IMIXCustom ¶
type IMIXCustom struct {
// contains filtered or unexported fields
}
IMIXCustom is an representation of custom IMIX entries to be configured for a flow on the ATE.
func (*IMIXCustom) AddEntry ¶
func (ic *IMIXCustom) AddEntry(size, weight uint32) *IMIXCustom
AddEntry adds a custom IMIX entry.
type IPv4Header ¶
type IPv4Header struct {
// contains filtered or unexported fields
}
IPv4Header is an IPv4 packet header.
func NewIPv4Header ¶
func NewIPv4Header() *IPv4Header
NewIPv4Header returns a new IPv4 header. The header is initialized with a hop limit of 64, DSCP of 0 (best effort), and ECN of 0 (not ECN capable). Unless specified, a best effort will be made to infer the src and dst addresses from the topology.
func (*IPv4Header) DstAddressRange ¶
func (h *IPv4Header) DstAddressRange() *ixnet.AddressRange
DstAddressRange returns the range of destination addresses of the IPv4 header for further configuration. By default, the range will be nonrandom values in the interval ["0.0.0.1", "255.255.255.255"). The count of values in the range is not set by default; the user must set it explicitly.
func (*IPv4Header) SrcAddressRange ¶
func (h *IPv4Header) SrcAddressRange() *ixnet.AddressRange
SrcAddressRange returns the range of source addresses of the IPv4 header for further configuration. By default, the range will be nonrandom values in the interval ["0.0.0.1", "255.255.255.255"). The count of values in the range is not set by default; the user must set it explicitly.
func (*IPv4Header) WithDSCP ¶
func (h *IPv4Header) WithDSCP(dscp uint8) *IPv4Header
WithDSCP sets the DSCP field of the IPv4 header.
func (*IPv4Header) WithDontFragment ¶
func (h *IPv4Header) WithDontFragment(dontFragment bool) *IPv4Header
WithDontFragment sets the "don't fragment" bit of the IPv4 header.
func (*IPv4Header) WithDstAddress ¶
func (h *IPv4Header) WithDstAddress(addr string) *IPv4Header
WithDstAddress sets the destination IP addresses of the IPv4 header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.
func (*IPv4Header) WithECN ¶
func (h *IPv4Header) WithECN(ecn uint8) *IPv4Header
WithECN sets the ECN field of the IPv4 header.
func (*IPv4Header) WithFragmentOffset ¶
func (h *IPv4Header) WithFragmentOffset(fragmentOffset int) *IPv4Header
WithFragmentOffset sets the fragment offset field of the IPv4 header.
func (*IPv4Header) WithHeaderChecksum ¶
func (h *IPv4Header) WithHeaderChecksum(checksum uint16) *IPv4Header
WithHeaderChecksum sets the header checksum field of the IPv4 header.
func (*IPv4Header) WithIdentification ¶
func (h *IPv4Header) WithIdentification(identification int) *IPv4Header
WithIdentification set identification field of IPv4 Header
func (*IPv4Header) WithMoreFragments ¶
func (h *IPv4Header) WithMoreFragments(moreFragments bool) *IPv4Header
WithMoreFragments sets the "more fragments" bit of the IPv4 Header
func (*IPv4Header) WithProtocol ¶
func (h *IPv4Header) WithProtocol(protocol int) *IPv4Header
WithProtocol sets the protocol field of the IPv4 header. If left unspecified, it will be inferred from the next header in the flow.
func (*IPv4Header) WithSrcAddress ¶
func (h *IPv4Header) WithSrcAddress(addr string) *IPv4Header
WithSrcAddress sets the source IP address of the IPv4 header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.
func (*IPv4Header) WithTTL ¶
func (h *IPv4Header) WithTTL(ttl uint8) *IPv4Header
WithTTL sets the TTL of the IPv4 header.
type IPv6Header ¶
type IPv6Header struct {
// contains filtered or unexported fields
}
IPv6Header is an IPv6 packet header.
func NewIPv6Header ¶
func NewIPv6Header() *IPv6Header
NewIPv6Header returns a new IPv6 header. The header is initialized with a hop limit of 64, DSCP of 0 (best effort), and ECN of 0 (not ECN capable). Unless specified, a best effort will be made to infer the src and dst addresses from the topology.
func (*IPv6Header) DstAddressRange ¶
func (h *IPv6Header) DstAddressRange() *ixnet.AddressRange
DstAddressRange returns the range of destination addresses of the IPv6 header for further configuration. By default, the range will be nonrandom values in the interval ["::1", "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]. The count of values in the range is not set by default; the user must set it explicitly.
func (*IPv6Header) FlowLabelRange ¶
func (h *IPv6Header) FlowLabelRange() *ixnet.UIntRange
FlowLabelRange sets the flow label of the IPv6 header to a range of values and returns the range. By default, the range will be nonrandom values in the interval [0, 2^20). The count of values in the range is not set by default; the user must set it explicitly.
func (*IPv6Header) SrcAddressRange ¶
func (h *IPv6Header) SrcAddressRange() *ixnet.AddressRange
SrcAddressRange returns the range of source addresses of the IPv6 header for further configuration. By default, the range will be nonrandom values in the interval ["::1", "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]. The count of values in the range is not set by default; the user must set it explicitly.
func (*IPv6Header) WithDSCP ¶
func (h *IPv6Header) WithDSCP(dscp uint8) *IPv6Header
WithDSCP sets the DSCP value of the IPv6 header.
func (*IPv6Header) WithDstAddress ¶
func (h *IPv6Header) WithDstAddress(addr string) *IPv6Header
WithDstAddress sets the destination IP addresses of the IPv6 header to the specified value. To generate a range of destination addresses, use DstAddressRange() instead.
func (*IPv6Header) WithECN ¶
func (h *IPv6Header) WithECN(ecn uint8) *IPv6Header
WithECN sets the ECN value of the IPv6 header.
func (*IPv6Header) WithFlowLabel ¶
func (h *IPv6Header) WithFlowLabel(flowLabel uint32) *IPv6Header
WithFlowLabel sets the flow label of the IPv6 header.
func (*IPv6Header) WithHopLimit ¶
func (h *IPv6Header) WithHopLimit(hopLimit uint8) *IPv6Header
WithHopLimit sets the hop limit of the IPv6 header.
func (*IPv6Header) WithSrcAddress ¶
func (h *IPv6Header) WithSrcAddress(addr string) *IPv6Header
WithSrcAddress sets the source IP addresses of the IPv6 header to the specified value. To generate a range of source addresses, use SrcAddressRange() instead.
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
Interface represents an ATE interface configuration.
func (*Interface) AddNetwork ¶
AddNetwork adds and returns a network with the specified name.
func (*Interface) ClearNetworks ¶
ClearNetworks clears networks from the interface.
func (*Interface) DHCPV6Client ¶ added in v0.1.1
func (i *Interface) DHCPV6Client() *ixnet.DHCPV6Client
DHCPV6Client creates a DHCP v6 Client or returns the existing config.
func (*Interface) DHCPV6Server ¶ added in v0.1.1
func (i *Interface) DHCPV6Server() *ixnet.DHCPV6Server
DHCPV6Server creates a DHCP v6 Server or returns the existing config.
func (*Interface) EndpointPB ¶
func (i *Interface) EndpointPB() *opb.Flow_Endpoint
EndpointPB returns the Interface config as an endpoint proto message.
func (*Interface) IPv4 ¶
IPv4 creates an IPv4 config for the interface or returns the existing config.
func (*Interface) IPv6 ¶
IPv6 creates an IPv6 config for the interface or returns the existing config.
func (*Interface) ISIS ¶
ISIS creates an ISIS config for the interface or returns the existing config. The default config paramas are: Area Id: 490001 Router Id: 0.0.0.0 Hello Interval: 10 seconds Dead Interval: 30 seconds
func (*Interface) IsLACPEnabled ¶
IsLACPEnabled returns whether the interface has LACP enabled.
func (*Interface) WithIPv4Loopback ¶
WithIPv4Loopback configures the IPv4 loopback address for the interface.
func (*Interface) WithIPv6Loopback ¶
WithIPv6Loopback configures the IPv6 loopback address for the interface.
func (*Interface) WithLACPEnabled ¶
WithLACPEnabled specifies whether the interface has LACP enabled.
type LACP ¶
type LACP struct {
// contains filtered or unexported fields
}
LACP is a LACP configuration on a LAG.
func (*LACP) WithEnabled ¶
WithEnabled sets whether LACP is enabled on the LAG.
type LAG ¶
type LAG struct {
// contains filtered or unexported fields
}
LAG is a link aggregation group.
type LDPHeader ¶
type LDPHeader struct {
// contains filtered or unexported fields
}
LDPHeader is an LDP packet header.
func NewLDPHeader ¶
func NewLDPHeader() *LDPHeader
NewLDPHeader returns a new LDP header. The header is initialized as a default Hello message.
func (*LDPHeader) Hello ¶
Hello sets the LDPHeader message type to a hello message with the following default values: - Hold time: 15 - Targeted: false - Request Targeted: false
func (*LDPHeader) WithLabelSpace ¶
WithLabelSpace sets the label space.
type LDPHello ¶
type LDPHello struct {
// contains filtered or unexported fields
}
LDPHello is an LDP hello message.
func (*LDPHello) WithHoldTimeSec ¶
WithHoldTimeSec sets the hold time in the Hello message.
func (*LDPHello) WithRequestTargeted ¶
WithRequestTargeted specifies if the message is requesting targeted Hello replies.
func (*LDPHello) WithTargeted ¶
WithTargeted specifies if the message is a targeted hello.
type MACsecHeader ¶
type MACsecHeader struct {
// contains filtered or unexported fields
}
MACsecHeader is a MACsec packet header.
func NewMACsecHeader ¶
func NewMACsecHeader() *MACsecHeader
NewMACsecHeader returns a new MACsec header.
type MPLSHeader ¶
type MPLSHeader struct {
// contains filtered or unexported fields
}
MPLSHeader is a Multiprotocol Label Switching packet header.
func NewMPLSHeader ¶
func NewMPLSHeader() *MPLSHeader
NewMPLSHeader returns a new MPLS header. The header is initialized with a traffic class of 0 (best effort) and TTL of 255.
func (*MPLSHeader) LabelRange ¶
func (h *MPLSHeader) LabelRange() *ixnet.UIntRange
LabelRange sets the label of the MPLS header to a range of values and returns the range. By default, the range will be nonrandom values in the interval [0, 2^20). The count of values in the range is not set by default; the user must set it explicitly.
func (*MPLSHeader) WithEXP ¶
func (h *MPLSHeader) WithEXP(exp uint8) *MPLSHeader
WithEXP sets the EXP (aka traffic class) of the MPLS header.
func (*MPLSHeader) WithLabel ¶
func (h *MPLSHeader) WithLabel(label uint32) *MPLSHeader
WithLabel sets the label of the MPLS header to the specified value. To generate a range of labels, use LabelRange() instead.
func (*MPLSHeader) WithTTL ¶
func (h *MPLSHeader) WithTTL(ttl uint8) *MPLSHeader
WithTTL sets the TTL of the MPLS header.
type OSPFAdvertisement ¶
type OSPFAdvertisement struct {
// contains filtered or unexported fields
}
OSPFAdvertisement respresents an OSPF link state update advertisement.
func (*OSPFAdvertisement) AdvertisementHeader ¶
func (h *OSPFAdvertisement) AdvertisementHeader() *OSPFLinkStateAdvertisementHeader
AdvertisementHeader returns the advertisement header for the link state advertisement.
type OSPFDatabaseDescription ¶
type OSPFDatabaseDescription struct {
// contains filtered or unexported fields
}
OSPFDatabaseDescription is an OSPF database description message.
func (*OSPFDatabaseDescription) WithInitial ¶
func (h *OSPFDatabaseDescription) WithInitial(initial bool) *OSPFDatabaseDescription
WithInitial sets the 'initial' bit of the database description message.
func (*OSPFDatabaseDescription) WithMTU ¶
func (h *OSPFDatabaseDescription) WithMTU(mtu uint32) *OSPFDatabaseDescription
WithMTU sets the MTU field of the database description message.
func (*OSPFDatabaseDescription) WithMaster ¶
func (h *OSPFDatabaseDescription) WithMaster(master bool) *OSPFDatabaseDescription
WithMaster sets the 'master' bit of the database description message.
func (*OSPFDatabaseDescription) WithMore ¶
func (h *OSPFDatabaseDescription) WithMore(more bool) *OSPFDatabaseDescription
WithMore sets the 'more' bit of the database description message.
func (*OSPFDatabaseDescription) WithSeq ¶
func (h *OSPFDatabaseDescription) WithSeq(seq uint32) *OSPFDatabaseDescription
WithSeq sets the sequence number of the database description message.
type OSPFHeader ¶
type OSPFHeader struct {
// contains filtered or unexported fields
}
OSPFHeader is an OSPF packet header.
func NewOSPFHeader ¶
func NewOSPFHeader() *OSPFHeader
NewOSPFHeader returns a new OSPF header. The header is initialized as a default Hello packet.
func (*OSPFHeader) DatabaseDescription ¶
func (h *OSPFHeader) DatabaseDescription() *OSPFDatabaseDescription
DatabaseDescription sets the OSPFHeader message type to a DBD message with MTU set to 1500.
func (*OSPFHeader) Hello ¶
func (h *OSPFHeader) Hello() *OSPFHello
Hello sets the OSPFHeader message type to a hello message with the following default values: - Network Mask: 24 - Hello Interval: 10 - Router Dead Interval: 40
func (*OSPFHeader) LinkStateAck ¶
func (h *OSPFHeader) LinkStateAck() *OSPFLinkStateAck
LinkStateAck sets the OSPFHeader message type to a link state ack.
func (*OSPFHeader) LinkStateRequest ¶
func (h *OSPFHeader) LinkStateRequest() *OSPFLinkStateRequest
LinkStateRequest sets the OSPFHeader message type to a link state request, defaulting to asking for a Router link.
func (*OSPFHeader) LinkStateUpdate ¶
func (h *OSPFHeader) LinkStateUpdate() *OSPFLinkStateUpdate
LinkStateUpdate sets the OSPFHeader message type to a link state update.
type OSPFHello ¶
type OSPFHello struct {
// contains filtered or unexported fields
}
OSPFHello is an OSPF hello message.
func (*OSPFHello) WithBackupDesignatedRouter ¶
WithBackupDesignatedRouter sets the backup designated router for the hello message.
func (*OSPFHello) WithDesignatedRouter ¶
WithDesignatedRouter sets the designated router for the hello message.
func (*OSPFHello) WithHelloIntervalSec ¶
WithHelloIntervalSec sets the interval for the hello message.
func (*OSPFHello) WithNeighbors ¶
WithNeighbors sets the neighbor routers for the hello message.
func (*OSPFHello) WithNetworkMaskLength ¶
WithNetworkMaskLength sets the network mask length for the hello message.
func (*OSPFHello) WithRouterDeadIntervalSec ¶
WithRouterDeadIntervalSec sets the dead interval for the hello message.
func (*OSPFHello) WithRouterPriority ¶
WithRouterPriority sets the router priority for the hello message.
type OSPFLinkStateAck ¶
type OSPFLinkStateAck struct {
// contains filtered or unexported fields
}
OSPFLinkStateAck is an OSPF link state ack message.
func (*OSPFLinkStateAck) AddAdvertisementHeader ¶
func (h *OSPFLinkStateAck) AddAdvertisementHeader() *OSPFLinkStateAdvertisementHeader
AddAdvertisementHeader adds a link state advertisement header to the link state ack message. Defaults to setting the link state type to 'router'.
type OSPFLinkStateAdvertisementHeader ¶
type OSPFLinkStateAdvertisementHeader struct {
// contains filtered or unexported fields
}
OSPFLinkStateAdvertisementHeader is an OSPF link state advertisement header.
func (*OSPFLinkStateAdvertisementHeader) WithAdvertisingRouter ¶
func (h *OSPFLinkStateAdvertisementHeader) WithAdvertisingRouter(id string) *OSPFLinkStateAdvertisementHeader
WithAdvertisingRouter sets the advertising router ID of the link state advertisement.
func (*OSPFLinkStateAdvertisementHeader) WithAge ¶
func (h *OSPFLinkStateAdvertisementHeader) WithAge(sec uint32) *OSPFLinkStateAdvertisementHeader
WithAge sets the age in seconds of the link state advertisement.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateID ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateID(id string) *OSPFLinkStateAdvertisementHeader
WithLinkStateID sets the ID of the link state advertisement.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeASExternal ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeASExternal() *OSPFLinkStateAdvertisementHeader
WithLinkStateTypeASExternal sets the link state type to AS external.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeNetwork ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeNetwork() *OSPFLinkStateAdvertisementHeader
WithLinkStateTypeNetwork sets the link state type to network.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeRouter ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeRouter() *OSPFLinkStateAdvertisementHeader
WithLinkStateTypeRouter sets the link state type to router.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryASBR ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryASBR() *OSPFLinkStateAdvertisementHeader
WithLinkStateTypeSummaryASBR sets the link state type to an AS boundary router summary.
func (*OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryNetwork ¶
func (h *OSPFLinkStateAdvertisementHeader) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateAdvertisementHeader
WithLinkStateTypeSummaryNetwork sets the link state type to a network summary.
func (*OSPFLinkStateAdvertisementHeader) WithSeq ¶
func (h *OSPFLinkStateAdvertisementHeader) WithSeq(seq uint32) *OSPFLinkStateAdvertisementHeader
WithSeq sets the sequence number of the link state advertisement.
type OSPFLinkStateRequest ¶
type OSPFLinkStateRequest struct {
// contains filtered or unexported fields
}
OSPFLinkStateRequest is an OSPF link state request message.
func (*OSPFLinkStateRequest) WithAdvertisingRouter ¶
func (h *OSPFLinkStateRequest) WithAdvertisingRouter(id string) *OSPFLinkStateRequest
WithAdvertisingRouter sets the advertising router ID of the link state request.
func (*OSPFLinkStateRequest) WithLinkStateID ¶
func (h *OSPFLinkStateRequest) WithLinkStateID(id string) *OSPFLinkStateRequest
WithLinkStateID sets the link state ID of the link state request.
func (*OSPFLinkStateRequest) WithLinkStateTypeASExternal ¶
func (h *OSPFLinkStateRequest) WithLinkStateTypeASExternal() *OSPFLinkStateRequest
WithLinkStateTypeASExternal sets the link state request type to AS external.
func (*OSPFLinkStateRequest) WithLinkStateTypeNetwork ¶
func (h *OSPFLinkStateRequest) WithLinkStateTypeNetwork() *OSPFLinkStateRequest
WithLinkStateTypeNetwork sets the link state request type to network.
func (*OSPFLinkStateRequest) WithLinkStateTypeRouter ¶
func (h *OSPFLinkStateRequest) WithLinkStateTypeRouter() *OSPFLinkStateRequest
WithLinkStateTypeRouter sets the link state request type to router.
func (*OSPFLinkStateRequest) WithLinkStateTypeSummaryASBR ¶
func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryASBR() *OSPFLinkStateRequest
WithLinkStateTypeSummaryASBR sets the link state request type to an AS boundary router summary.
func (*OSPFLinkStateRequest) WithLinkStateTypeSummaryNetwork ¶
func (h *OSPFLinkStateRequest) WithLinkStateTypeSummaryNetwork() *OSPFLinkStateRequest
WithLinkStateTypeSummaryNetwork sets the link state request type to a network summary.
type OSPFLinkStateUpdate ¶
type OSPFLinkStateUpdate struct {
// contains filtered or unexported fields
}
OSPFLinkStateUpdate is an OSPF link state update message.
func (*OSPFLinkStateUpdate) AddAdvertisement ¶
func (h *OSPFLinkStateUpdate) AddAdvertisement() *OSPFAdvertisement
AddAdvertisement adds a link state advertisement to the link state update message. Defaults to setting the link state type to 'router'.
type PIMHeader ¶
type PIMHeader struct {
// contains filtered or unexported fields
}
PIMHeader is a PIM packet header.
func NewPIMHeader ¶
func NewPIMHeader() *PIMHeader
NewPIMHeader returns a new PIM header. The header is initialized with a default message type of 'Hello'.
type PIMHello ¶
type PIMHello struct {
// contains filtered or unexported fields
}
PIMHello is a PIM hello message.
type RSVPHeader ¶
type RSVPHeader struct {
// contains filtered or unexported fields
}
RSVPHeader is an RSVP packet header.
func NewRSVPHeader ¶
func NewRSVPHeader() *RSVPHeader
NewRSVPHeader returns a new RSVP header. The header is initialized with a default message type of 'Path'.
func (*RSVPHeader) WithMessageTypePath ¶
func (h *RSVPHeader) WithMessageTypePath() *RSVPHeader
WithMessageTypePath sets the message type of the RSVP header to 'Path'.
func (*RSVPHeader) WithMessageTypeResv ¶
func (h *RSVPHeader) WithMessageTypeResv() *RSVPHeader
WithMessageTypeResv sets the message type of the RSVP header to 'Resv'.
func (*RSVPHeader) WithRefreshReductionCapable ¶
func (h *RSVPHeader) WithRefreshReductionCapable(rr bool) *RSVPHeader
WithRefreshReductionCapable sets the refresh reduction bit of the RSVP header.
func (*RSVPHeader) WithTTL ¶
func (h *RSVPHeader) WithTTL(ttl uint32) *RSVPHeader
WithTTL sets the TTL of the RSVP header.
func (*RSVPHeader) WithVersion ¶
func (h *RSVPHeader) WithVersion(v uint32) *RSVPHeader
WithVersion sets the version for the RSVP header.
type SetLACPState ¶
type SetLACPState struct {
// contains filtered or unexported fields
}
SetLACPState is an action to set the state of LACP on an ATE.
func (*SetLACPState) Send ¶
func (s *SetLACPState) Send(t testing.TB)
Send sends the SetLACPState action to the ATE.
func (*SetLACPState) String ¶
func (s *SetLACPState) String() string
func (*SetLACPState) WithEnabled ¶
func (s *SetLACPState) WithEnabled(enabled bool) *SetLACPState
WithEnabled sets the desired LACP state of the port.
func (*SetLACPState) WithPort ¶
func (s *SetLACPState) WithPort(port *Port) *SetLACPState
WithPort sets the port whose LACP state will be changed.
type SetPortState ¶
type SetPortState struct {
// contains filtered or unexported fields
}
SetPortState is an action to set the state of a port on an ATE.
func (*SetPortState) Send ¶
func (s *SetPortState) Send(t testing.TB)
Send sends the SetPortState action to the ATE.
func (*SetPortState) String ¶
func (s *SetPortState) String() string
func (*SetPortState) WithEnabled ¶
func (s *SetPortState) WithEnabled(enabled bool) *SetPortState
WithEnabled sets the desired state of the port.
func (*SetPortState) WithPort ¶
func (s *SetPortState) WithPort(port *Port) *SetPortState
WithPort sets the port whose state will be changed.
type TCPHeader ¶
type TCPHeader struct {
// contains filtered or unexported fields
}
TCPHeader is a Transmission Control Protocol packet header.
func NewTCPHeader ¶
func NewTCPHeader() *TCPHeader
NewTCPHeader returns a new TCP header. The header is initialized with none of its properties specified.
func (*TCPHeader) DstPortRange ¶
DstPortRange returns the range of destination ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.
func (*TCPHeader) SrcPortRange ¶
SrcPortRange returns the range of source ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.
func (*TCPHeader) WithDstPort ¶
WithDstPort sets the destination port of the TCP header to the specified value. To generate a range of destination ports, use DstPortRange() instead.
func (*TCPHeader) WithSequenceNumber ¶
WithSequenceNumber sets sequence number of the TCP header.
func (*TCPHeader) WithSrcPort ¶
WithSrcPort sets the source port of the TCP header to the specified value. To generate a range of source ports, use SrcPortRange() instead.
type Topology ¶
type Topology struct {
// contains filtered or unexported fields
}
Topology is the ATE Topology API.
type Traffic ¶
type Traffic struct {
// contains filtered or unexported fields
}
Traffic is the ATE Traffic API.
func (*Traffic) NewFlow ¶
NewFlow returns a new Traffic flow. By default the flow will have the following properties:
frame size: max(64, sizeof(headers) + (4 * number of ethernet headers)) frame rate: 10% of the line rate header addresses inferred: true
func (*Traffic) Start ¶
Start pushes and starts provided traffic flows on the ATE. If no flows are provided, starts the previously pushed flows.
type Transmission ¶
type Transmission struct {
// contains filtered or unexported fields
}
Transmission represents the transmission pattern of a flow.
func (*Transmission) WithInterburstGapBytes ¶
func (t *Transmission) WithInterburstGapBytes(bytes uint32) *Transmission
WithInterburstGapBytes sets the gap (in bytes) between transmission bursts. May only be set when the transmission pattern is burst.
func (*Transmission) WithInterburstGapNanoseconds ¶
func (t *Transmission) WithInterburstGapNanoseconds(nanoseconds uint32) *Transmission
WithInterburstGapNanoseconds sets the gap (in nanoseconds) between transmission bursts. May only be set when the transmission pattern is burst.
func (*Transmission) WithMinGapBytes ¶
func (t *Transmission) WithMinGapBytes(minPacketGapBytes uint32) *Transmission
WithMinGapBytes sets the minimum gap between transmitted packets.
func (*Transmission) WithPacketsPerBurst ¶
func (t *Transmission) WithPacketsPerBurst(packetsPerBurst uint32) *Transmission
WithPacketsPerBurst sets the number of packets to transmit per burst. May only be set when the transmission pattern is burst.
func (*Transmission) WithPatternBurst ¶
func (t *Transmission) WithPatternBurst() *Transmission
WithPatternBurst configures the transmission to send packets in bursts.
func (*Transmission) WithPatternContinuous ¶
func (t *Transmission) WithPatternContinuous() *Transmission
WithPatternContinuous configures the transmission to send packets continuously.
func (*Transmission) WithPatternFixedDuration ¶
func (t *Transmission) WithPatternFixedDuration(secs uint32) *Transmission
WithPatternFixedDuration configures the transmission to send a specified number of seconds.
func (*Transmission) WithPatternFixedPacketCount ¶
func (t *Transmission) WithPatternFixedPacketCount(packetsCount uint32) *Transmission
WithPatternFixedPacketCount configures the transmission to send a specified number of packets.
type UDPHeader ¶
type UDPHeader struct {
// contains filtered or unexported fields
}
UDPHeader is a User Datagram Protocol packet header.
func NewUDPHeader ¶
func NewUDPHeader() *UDPHeader
NewUDPHeader returns a new UDP header. The header is initialized with none of its properties specified.
func (*UDPHeader) DstPortRange ¶
DstPortRange returns the range of destination ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.
func (*UDPHeader) SrcPortRange ¶
SrcPortRange returns the range of source ports of the TCP header for further configuration. By default, the range will be nonrandom values in the interval [1, 2^16). The count of values in the range is not set by default; the user must set it explicitly.
func (*UDPHeader) WithDstPort ¶
WithDstPort sets the destination port of the TCP header to the specified value. To generate a range of destination ports, use DstPortRange() instead.
func (*UDPHeader) WithSrcPort ¶
WithSrcPort sets the source port of the TCP header to the specified value. To generate a range of source ports, use SrcPortRange() instead.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package binding holds the Ondatra binding interface.
|
Package binding holds the Ondatra binding interface. |
grpcutil
Package grpcutil contains gRPC utilities useful to binding implementations.
|
Package grpcutil contains gRPC utilities useful to binding implementations. |
grpcutil/testservice
Package testservice provides an interface for testing with the Test service.
|
Package testservice provides an interface for testing with the Test service. |
ixweb
Package ixweb provides a connection to the Ixia Web Platform.
|
Package ixweb provides a connection to the Ixia Web Platform. |
portgraph
Package portgraph searches for a graph that satisfies a set of constraints.
|
Package portgraph searches for a graph that satisfies a set of constraints. |
Package config contains APIs for configuring DUTs.
|
Package config contains APIs for configuring DUTs. |
Package debug contains the Ondatra debug API.
|
Package debug contains the Ondatra debug API. |
Package eventlis provides an event listener API.
|
Package eventlis provides an event listener API. |
Package fakebind implements a fake testbed binding, backed by a fake SSH server.
|
Package fakebind implements a fake testbed binding, backed by a fake SSH server. |
Package gnmi contains test-friendly gNMI funcs.
|
Package gnmi contains test-friendly gNMI funcs. |
migrator
The migrator command contains a runnable version of the analyzer.
|
The migrator command contains a runnable version of the analyzer. |
migrator/gnmifix
Package gnmifix fixes deprecated Ondatra Telemetry code.
|
Package gnmifix fixes deprecated Ondatra Telemetry code. |
oc
Package oc is a generated package which contains definitions of structs which represent a YANG schema.
|
Package oc is a generated package which contains definitions of structs which represent a YANG schema. |
oc/acl
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package acl is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/ateflow
Package ateflow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package ateflow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/definedsets
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package definedsets is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/gnmicollectormetadata
Package gnmicollectormetadata is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package gnmicollectormetadata is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/interfaces
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package interfaces is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/keychain
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package keychain is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/lacp
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/lldp
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/networkinstance
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package networkinstance is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/ocpath
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package ocpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/platform
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package platform is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/qos
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package qos is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/routingpolicy
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package routingpolicy is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/sampling
Package sampling is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package sampling is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/system
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package system is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
oc/terminaldevice
Package terminaldevice is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package terminaldevice is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg
Package otg is a generated package which contains definitions of structs which represent a YANG schema.
|
Package otg is a generated package which contains definitions of structs which represent a YANG schema. |
otg/bgp
Package bgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package bgp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/discovery
Package discovery is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package discovery is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/flow
Package flow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package flow is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/isis
Package isis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package isis is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/lacp
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lacp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/lag
Package lag is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lag is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/lldp
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package lldp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/otgpath
Package otgpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package otgpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/port
Package port is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package port is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
otg/rsvp
Package rsvp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
|
Package rsvp is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema. |
internal
|
|
ate
Package ate controls automated test equipment (ATE) for ONDATRA tests.
|
Package ate controls automated test equipment (ATE) for ONDATRA tests. |
display
Package display prints and receives input from the console.
|
Package display prints and receives input from the console. |
events
Package events prints and responds to test events.
|
Package events prints and responds to test events. |
fakegnmi
Package fakegnmi implements a fake GNMI server with the ability to stub responses.
|
Package fakegnmi implements a fake GNMI server with the ability to stub responses. |
flags
Package flags defines the flags accepted by Ondatra tests.
|
Package flags defines the flags accepted by Ondatra tests. |
ixconfig
Package ixconfig contains generated IxNetwork structs (along with some hand-written helper code) and implements an Ixia JSON config client using those structs.
|
Package ixconfig contains generated IxNetwork structs (along with some hand-written helper code) and implements an Ixia JSON config client using those structs. |
ixgnmi
Package ixgnmi provides a GNMI client for Ixia.
|
Package ixgnmi provides a GNMI client for Ixia. |
junitxml
Package junitxml provides a mechanism to convert a streamed test log to JUnit XML.
|
Package junitxml provides a mechanism to convert a streamed test log to JUnit XML. |
orderedmap
Package orderedmap provides a map that remembers the order keys were inserted.
|
Package orderedmap provides a map that remembers the order keys were inserted. |
rawapis
Package rawapis centralizes the management of Ondatra raw APIs.
|
Package rawapis centralizes the management of Ondatra raw APIs. |
testbed
Package testbed implements Testing API for a testbed.
|
Package testbed implements Testing API for a testbed. |
Package ixnet provides an IxNetwork API.
|
Package ixnet provides an IxNetwork API. |
Package knebind provides an Ondatra binding for KNE devices.
|
Package knebind provides an Ondatra binding for KNE devices. |
creds
Package creds contains logic for KNE credentials.
|
Package creds contains logic for KNE credentials. |
init
Package init installs the Ondatra binding for testing with kne clusters.
|
Package init installs the Ondatra binding for testing with kne clusters. |
solver
Package solver creates solutions from devices and topologies.
|
Package solver creates solutions from devices and topologies. |
Package logging utilities for logging from Ondatra tests.
|
Package logging utilities for logging from Ondatra tests. |
Package netutil provides network-related helper functions for testing.
|
Package netutil provides network-related helper functions for testing. |
Package otg provides an API to Open Traffic Generator.
|
Package otg provides an API to Open Traffic Generator. |
Package proxy provide a standard grpc proxy for use with Ondatra.
|
Package proxy provide a standard grpc proxy for use with Ondatra. |
grpcproxy
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections.
|
Package grpcproxy provides a single proxy grpc server which can be used to tranparently forward both unary and bidirectional streams across different gRPC connections. |
httpovergrpc
Package httpovergrpc implements a http/https service over grpc transport.
|
Package httpovergrpc implements a http/https service over grpc transport. |
Package raw provides raw client APIs.
|
Package raw provides raw client APIs. |
Package report provides ways to customize the JUnit XML report.
|
Package report provides ways to customize the JUnit XML report. |