public final class Instructions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Instructions.ExtensionInstructionWrapper
Extension instruction.
|
static class |
Instructions.GroupInstruction
Group Instruction.
|
static class |
Instructions.MetadataInstruction
Metadata instruction.
|
static class |
Instructions.MeterInstruction
A meter instruction.
|
static class |
Instructions.NoActionInstruction
No Action instruction.
|
static class |
Instructions.OutputInstruction
Output Instruction.
|
static class |
Instructions.SetQueueInstruction
Set-Queue Instruction.
|
static class |
Instructions.StatTriggerInstruction |
static class |
Instructions.TableTypeTransition
Transition instruction.
|
Modifier and Type | Method and Description |
---|---|
static L3ModificationInstruction |
copyTtlIn()
Creates a L3 copy TTL to inner header modification.
|
static L3ModificationInstruction |
copyTtlOut()
Creates a L3 copy TTL to outer header modification.
|
static Instructions.GroupInstruction |
createGroup(GroupId groupId)
Creates a group instruction.
|
static Instructions.NoActionInstruction |
createNoAction()
Creates a no action instruction.
|
static Instructions.OutputInstruction |
createOutput(PortNumber number)
Creates an output instruction using the specified port number.
|
static L2ModificationInstruction |
decMplsTtl()
Creates a MPLS decrement TTL modification.
|
static L3ModificationInstruction |
decNwTtl()
Creates a L3 decrement TTL modification.
|
static Instructions.ExtensionInstructionWrapper |
extension(ExtensionTreatment extension,
DeviceId deviceId)
Creates an extension instruction.
|
static Instructions.MeterInstruction |
meterTraffic(MeterId meterId)
Creates a meter instruction.
|
static L3ModificationInstruction |
modArpSha(MacAddress addr)
Creates a l3 ARP Ether src modification.
|
static L3ModificationInstruction |
modArpSpa(IpAddress addr)
Creates a L3 ARP IP src modification.
|
static L0ModificationInstruction |
modL0Lambda(Lambda lambda)
Creates an L0 modification with the specified OCh signal.
|
static L1ModificationInstruction |
modL1OduSignalId(OduSignalId oduSignalId)
Creates an L1 modification with the specified ODU signal Id.
|
static L2ModificationInstruction |
modL2Dst(MacAddress addr)
Creates a L2 dst modification.
|
static L2ModificationInstruction |
modL2Src(MacAddress addr)
Creates a l2 src modification.
|
static L3ModificationInstruction |
modL3ArpOp(short op)
Creates a l3 ARP operation modification.
|
static L3ModificationInstruction |
modL3Dst(IpAddress addr)
Creates a L3 IPv4 dst modification.
|
static L3ModificationInstruction |
modL3IPv6Dst(IpAddress addr)
Creates a L3 IPv6 dst modification.
|
static L3ModificationInstruction |
modL3IPv6FlowLabel(int flowLabel)
Creates a L3 IPv6 Flow Label modification.
|
static L3ModificationInstruction |
modL3IPv6Src(IpAddress addr)
Creates a L3 IPv6 src modification.
|
static L3ModificationInstruction |
modL3Src(IpAddress addr)
Creates a L3 IPv4 src modification.
|
static L2ModificationInstruction |
modMplsBos(boolean mplsBos)
Creates a MPLS BOS bit modification.
|
static L2ModificationInstruction |
modMplsLabel(MplsLabel mplsLabel)
Creates a MPLS label modification.
|
static L4ModificationInstruction |
modTcpDst(TpPort port)
Creates a TCP dst modification.
|
static L4ModificationInstruction |
modTcpSrc(TpPort port)
Creates a TCP src modification.
|
static L2ModificationInstruction |
modTunnelId(long tunnelId)
Creates a Tunnel ID modification.
|
static L4ModificationInstruction |
modUdpDst(TpPort port)
Creates a UDP dst modification.
|
static L4ModificationInstruction |
modUdpSrc(TpPort port)
Creates a UDP src modification.
|
static L2ModificationInstruction |
modVlanId(VlanId vlanId)
Creates a VLAN ID modification.
|
static L2ModificationInstruction |
modVlanPcp(java.lang.Byte vlanPcp)
Creates a VLAN PCP modification.
|
static PiInstruction |
piTableAction(PiTableAction piTableAction)
Creates a protocol independent instruction.
|
static Instruction |
popMpls()
Creates a pop MPLS header instruction.
|
static Instruction |
popMpls(EthType etherType)
Creates a pop MPLS header instruction with a particular ethertype.
|
static Instruction |
popVlan()
Creates a pop VLAN header instruction.
|
static Instruction |
pushMpls()
Creates a push MPLS header instruction.
|
static Instruction |
pushVlan()
Creates a push VLAN header instruction.
|
static Instruction |
pushVlan(EthType ethType)
Creates a push VLAN header instruction using the supplied Ethernet type.
|
static Instructions.SetQueueInstruction |
setQueue(long queueId,
PortNumber port)
Creates a set-queue instruction.
|
static Instructions.StatTriggerInstruction |
statTrigger(java.util.Map<StatTriggerField,java.lang.Long> statTriggerMap,
StatTriggerFlag flag)
Creates a stat trigger instruction.
|
static Instruction |
transition(java.lang.Integer tableId)
Sends the packet to the table id.
|
static Instruction |
writeMetadata(long metadata,
long metadataMask)
Writes metadata to associate with a packet.
|
public static Instructions.OutputInstruction createOutput(PortNumber number)
number
- port numberpublic static Instructions.NoActionInstruction createNoAction()
public static Instructions.GroupInstruction createGroup(GroupId groupId)
groupId
- Group Idpublic static Instructions.SetQueueInstruction setQueue(long queueId, PortNumber port)
queueId
- Queue Idport
- Port numberpublic static Instructions.MeterInstruction meterTraffic(MeterId meterId)
meterId
- Meter Idpublic static L0ModificationInstruction modL0Lambda(Lambda lambda)
lambda
- OCh signalpublic static L1ModificationInstruction modL1OduSignalId(OduSignalId oduSignalId)
oduSignalId
- ODU Signal Idpublic static L2ModificationInstruction modL2Src(MacAddress addr)
addr
- the mac address to modify topublic static L2ModificationInstruction modL2Dst(MacAddress addr)
addr
- the mac address to modify topublic static L2ModificationInstruction modVlanId(VlanId vlanId)
vlanId
- the VLAN ID to modify topublic static L2ModificationInstruction modVlanPcp(java.lang.Byte vlanPcp)
vlanPcp
- the PCP to modify topublic static L2ModificationInstruction modMplsLabel(MplsLabel mplsLabel)
mplsLabel
- MPLS label to setpublic static L2ModificationInstruction modMplsBos(boolean mplsBos)
mplsBos
- MPLS BOS bit to set (true) or unset (false)public static L2ModificationInstruction decMplsTtl()
public static L3ModificationInstruction modL3Src(IpAddress addr)
addr
- the IPv4 address to modify topublic static L3ModificationInstruction modL3Dst(IpAddress addr)
addr
- the IPv4 address to modify topublic static L3ModificationInstruction modL3IPv6Src(IpAddress addr)
addr
- the IPv6 address to modify topublic static L3ModificationInstruction modL3IPv6Dst(IpAddress addr)
addr
- the IPv6 address to modify topublic static L3ModificationInstruction modL3IPv6FlowLabel(int flowLabel)
flowLabel
- the IPv6 flow label to modify to (20 bits)public static L3ModificationInstruction decNwTtl()
public static L3ModificationInstruction copyTtlOut()
public static L3ModificationInstruction copyTtlIn()
public static L3ModificationInstruction modArpSpa(IpAddress addr)
addr
- the ip address to modify topublic static L3ModificationInstruction modArpSha(MacAddress addr)
addr
- the mac address to modify topublic static L3ModificationInstruction modL3ArpOp(short op)
op
- the ARP operation to modify topublic static Instruction pushMpls()
public static Instruction popMpls()
public static Instruction popMpls(EthType etherType)
etherType
- Ethernet type to setpublic static Instruction popVlan()
public static Instruction pushVlan()
public static Instruction pushVlan(EthType ethType)
ethType
- the Ethernet type to usepublic static Instruction transition(java.lang.Integer tableId)
tableId
- flow rule table idpublic static Instruction writeMetadata(long metadata, long metadataMask)
metadata
- the metadata value to writemetadataMask
- the bits to mask for the metadata valuepublic static L2ModificationInstruction modTunnelId(long tunnelId)
tunnelId
- the Tunnel ID to modify topublic static L4ModificationInstruction modTcpSrc(TpPort port)
port
- the TCP port number to modify topublic static L4ModificationInstruction modTcpDst(TpPort port)
port
- the TCP port number to modify topublic static L4ModificationInstruction modUdpSrc(TpPort port)
port
- the UDP port number to modify topublic static L4ModificationInstruction modUdpDst(TpPort port)
port
- the UDP port number to modify topublic static PiInstruction piTableAction(PiTableAction piTableAction)
piTableAction
- protocol independent instructionpublic static Instructions.ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId)
extension
- extension instructiondeviceId
- device IDpublic static Instructions.StatTriggerInstruction statTrigger(java.util.Map<StatTriggerField,java.lang.Long> statTriggerMap, StatTriggerFlag flag)
statTriggerMap
- map keeps stat trigger thresholdflag
- stat trigger flag