Reference Guide

Table Of Contents
.addField(createBasicField(PV, ETH_SRC, MAC, MAC_MASK))
.addField(createBasicField(PV, ETH_TYPE, EthernetType.IPv4))
.addField(createBasicField(PV, IP_PROTO, IpProtocol.TCP))
.addField(createBasicField(PV, TCP_DST, SMTP_PORT));
return (Match) mm.toImmutable();
}
private static final long INS_META_MASK = 0xffff0000;
private static final long INS_META_DATA = 0x33ab0000;
private List<Instruction> createInstructions() {
// NOTE static imports of:
// com.hp.of.lib.instr.ActionFactory.createAction;
// com.hp.of.lib.instr.InstructionFactory.createInstruction;
// com.hp.of.lib.instr.InstructionFactory.createMutableInstruction;
List<Instruction> result = new ArrayList<Instruction>();
result.add(createInstruction(PV, InstructionType.WRITE_METADATA,
INS_META_DATA, INS_META_MASK));
InstrMutableAction apply = createMutableInstruction(PV,
InstructionType.APPLY_ACTIONS);
apply.addAction(createAction(PV, ActionType.DEC_NW_TTL))
.addAction(createActionSetField(PV, ETH_DST, MAC_DEST))
.addAction(createActionSetField(PV, IPV4_DST, IP_DEST));
result.add((Instruction) apply.toImmutable());
return result;
}
}
Core Controller
The Core Controller handles the connections from OpenFlow switches and provides the means for
upper layers of software to interact with those switches via the ControllerService API.
Design Goals
The following are the overall design goals of the core controller:
To support OpenFlow 1.0.0 and 1.3.2 switches.
To provide the base platform for higher-level OpenFlow Controller functionality.
To implement the services of:
Accepting and maintaining connections from OpenFlow-capable switches
33