1 module openflow-types {
2 namespace "urn:opendaylight:openflow:common:types";
5 revision "2013-07-31" {
6 //description "OpenFlow 1.3 - common types model";
11 range "0..4294967040"; // 0xffffff00 See for actual value
15 typedef special-port-number {
19 //description "Send the packet out the input port. This virtual port must be explicitly used in order to send back out of the input port."
22 //value "4294967289"; // 0xfffffff9;
23 //description "Perform actions in flow table. NB: This can only be the destination port for packet-out messages."
26 //value "4294967290"; // 0xfffffffa;
27 //description "Process with normal L2/L3 switching."
30 //value "4294967291"; // 0xfffffffb;
31 //description "All physical ports except input port and those disabled by STP."
34 //value "4294967292"; // 0xfffffffc;
35 //description "All physical ports except input port."
38 //value "4294967293"; // 0xfffffffd;
39 //description "Send to controller."
42 //value "4294967294"; // 0xfffffffe;
43 //description "Local openflow port."
46 //value "4294967295"; // 0xffffffff;
47 //description "not associated with a physical port."
52 typedef any-port-number {
55 type special-port-number;
59 typedef port-features {
60 ////description "Features of ports available in datapath.";
61 //reference "ofp_port_features";
65 //description "10 Mb half-duplex rate support.";
69 //description "10 Mb full-duplex rate support.";
73 //description "100 Mb half-duplex rate support.";
77 //description "100 Mb full-duplex rate support.";
81 //description "1 Gb half-duplex rate support.";
85 //description "1 Gb full-duplex rate support.";
89 //description "10 Gb full-duplex rate support.";
93 //description "40 Gb full-duplex rate support.";
97 //description "100 Gb full-duplex rate support.";
101 //description "1 Tb full-duplex rate support.";
105 //description "Other rate, not in the list.";
109 //description "Copper medium.";
113 //description "Fiber medium.";
117 //description "Auto-negotiation.";
121 //description "Pause.";
125 //description "Asymmetric pause.";
130 typedef port-config {
132 "Flags to indicate behavior of the physical port. These flags are
133 describe the current configuration and used port_mod message
134 to configure the port's behavior.";
137 //description " Port is administratively down.";
141 //description " Drop all packets received by port.";
145 //description " Drop packets forwarded to port.";
149 //description "Do not send packet-in msgs for port.";
157 "Current state of the physical port. These are not configurable from
161 //description "No physical link present.";
165 //description "Port is blocked";
169 //description "Live for Fast Failover Group.";
175 identity match-type-base {
177 "The match type indicates the match structure (set of fields that compose the
178 match) in use. The match type is placed in the type field at the beginning
179 of all match structures.Extensions that define match types may be
180 published on the ONF wiki. Support for extensions is optional.";
183 identity standard-match-type {
185 base oft:match-type-base;
190 // base oft:match-type-base;
193 //TODO: use identityref, when generating available
197 identity instruction {
229 description "Hello Protocol failed.";
233 description "Request was not understood.";
237 description "Error in action description.";
239 enum BAD_INSTRUCTION {
241 description "Error in instruction list.";
245 description "Error in match.";
247 enum FLOW_MOD_FAILED {
249 description "Problem modifying flow entry.";
251 enum GROUP_MOD_FAILED {
253 description "Problem modifying group entry.";
255 enum PORT_MOD_FAILED {
257 description "Port mod request failed.";
259 enum TABLE_MOD_FAILED {
261 description "Table mod request failed.";
263 enum QUEUE_OP_FAILED {
265 description "Queue operation failed.";
267 enum SWITCH_CONFIG_FAILED {
269 description "Switch config request failed.";
271 enum ROLE_REQUEST_FAILED {
273 description "Controller Role request failed.";
275 enum METER_MOD_FAILED {
277 description "Error in meter.";
279 enum TABLE_FEATURES_FAILED {
281 description "Setting table features failed.";
284 value 65535; //0xffff
285 description "Experimenter error messages.";
290 typedef hello-element-type {
294 description "Bitmap of version supported.";
299 typedef switch-config-flag {
300 /* Handling of IP fragments. */
304 description "No special handling for fragments.";
306 enum OFPC_FRAG_DROP {
308 description "Drop fragments.";
310 enum OFPC_FRAG_REASM {
312 description "Reassemble (only if OFPC_IP_REASM set).";
314 enum OFPC_FRAG_MASK {
320 typedef flow-removed-reason {
323 enum OFPRR_IDLE_TIMEOUT {
325 description "Flow idle time exceeded idle_timeout.";
327 enum OFPRR_HARD_TIMEOUT {
329 description "Time exceeded hard_timeout.";
333 description "Evicted by a DELETE flow mod.";
335 enum OFPRR_GROUP_DELETE {
337 description "Group was removed.";
342 typedef port-reason {
347 description "The port was added.";
351 description "he port was removed.";
355 description "Some attribute of the port has changed.";
360 typedef flow-mod-command {
361 /* ofp_flow_mod_command */
365 description "New flow.";
369 description "Modify all matching flows.";
371 enum OFPFC_MODIFY_STRICT {
373 description "Modify entry strictly matching wildcards and priority.";
377 description "Delete all matching flows.";
379 enum OFPFC_DELETE_STRICT {
381 description "Delete entry strictly matching wildcards and priority.";
386 typedef flow-mod-flags {
387 /* ofp_flow_mod_flags */
389 bit OFPFF_SEND_FLOW_REM {
391 /* Send flow removed message when flow expires or is deleted. */
393 bit OFPFF_CHECK_OVERLAP {
395 /* Check for overlapping entries first. */
397 bit OFPFF_RESET_COUNTS {
399 /* Reset flow packet and byte counts. */
401 bit OFPFF_NO_PKT_COUNTS {
403 /* Don't keep track of packet count. */
405 bit OFPFF_NO_BYT_COUNTS {
407 /* Don't keep track of byte count. */
412 typedef group-mod-command {
413 /* ofp_group_mod_command */
417 description "New group.";
421 description "Modify all matching groups.";
425 description "Delete all matching groups.";
436 description "All (multicast/broadcast) group.";
440 description "Select group.";
442 enum OFPGT_INDIRECT {
444 description "Indirect group.";
448 description "Fast failover group.";
453 typedef multipart-request-flags {
455 "enum ofp_multipart_request_flags ";
457 bit OFPMPF_REQ_MORE {
458 //description "More requests to follow.";
464 typedef multipart-type {
465 /* ofp_multipart_type */
469 description "Description of this OpenFlow switch.
470 The request body is empty.
471 The reply body is struct ofp_desc.";
475 description "Individual flow statistics.
476 The request body is struct ofp_flow_stats_request.
477 The reply body is an array of struct ofp_flow_stats.";
479 enum OFPMP_AGGREGATE {
481 description "Aggregate flow statistics.
482 The request body is struct ofp_aggregate_stats_request.
483 The reply body is struct ofp_aggregate_stats_reply.";
487 description "Flow table statistics.
488 The request body is empty.
489 The reply body is an array of struct ofp_table_stats.";
491 enum OFPMP_PORT_STATS {
493 description "Port statistics.
494 The request body is struct ofp_port_stats_request.
495 The reply body is an array of struct ofp_port_stats.";
499 description "Queue statistics for a port
500 The request body is struct ofp_queue_stats_request.
501 The reply body is an array of struct ofp_queue_stats";
505 description "Group counter statistics.
506 The request body is struct ofp_group_stats_request.
507 The reply is an array of struct ofp_group_stats.";
509 enum OFPMP_GROUP_DESC {
511 description "Group description.
512 The request body is empty.
513 The reply body is an array of struct ofp_group_desc.";
515 enum OFPMP_GROUP_FEATURES {
517 description "Group features.
518 The request body is empty.
519 The reply body is struct ofp_group_features.";
523 description "Meter statistics.
524 The request body is struct ofp_meter_multipart_requests.
525 The reply body is an array of struct ofp_meter_stats.";
527 enum OFPMP_METER_CONFIG {
529 description "Meter configuration.
530 The request body is struct ofp_meter_multipart_requests.
531 The reply body is an array of struct ofp_meter_config.";
533 enum OFPMP_METER_FEATURES {
535 description "Meter features.
536 The request body is empty.
537 The reply body is struct ofp_meter_features.";
539 enum OFPMP_TABLE_FEATURES {
541 description "Table features.
542 The request body is either empty or contains an array of
543 struct ofp_table_features containing the controller’s
544 desired view of the switch. If the switch is unable to
545 set the specified view an error is returned.
546 The reply body is an array of struct ofp_table_features.";
548 enum OFPMP_PORT_DESC {
550 description "Port description.
551 The request body is empty.
552 The reply body is an array of struct ofp_port.";
554 enum OFPMP_EXPERIMENTER {
555 value 65535; //0xffff
556 description "Experimenter extension.
557 The request and reply bodies begin with
558 struct ofp_experimenter_multipart_header.
559 The request and reply bodies are otherwise experimenter-defined.";
564 typedef queue-property {
565 /* ofp_queue_properties */
569 description "All (multicast/broadcast) group.";
571 enum OFPQT_MIN_RATE {
573 description "Minimum datarate guaranteed.";
575 enum OFPQT_MAX_RATE {
577 description "Maximum datarate.";
579 enum OFPQT_EXPERIMENTER {
580 value 65535; // 0xffff
581 description "Experimenter defined property.";
586 typedef controller-role {
587 /* ofp_controller_role */
589 enum OFPCR_ROLE_NOCHANGE {
591 description "Don’t change current role.";
593 enum OFPCR_ROLE_EQUAL {
595 description "Default role, full access.";
597 enum OFPCR_ROLE_MASTER {
599 description "Full access, at most one master.";
601 enum OFPCR_ROLE_SLAVE {
603 description "Read-only access.";
608 typedef packet-in-reason {
609 /* ofp_packet_in_reason */
613 description "No matching flow (table-miss flow entry). ";
617 description "Action explicitly output to controller. ";
619 enum OFPR_INVALID_TTL {
621 description "Packet has invalid TTL ";
626 typedef meter-mod-command {
627 /* ofp_meter_mod_command */
630 description "New meter. ";
633 description "Modify specified meter. ";
636 description "Delete specified meter. ";
641 typedef meter-flags {
642 /* ofp_meter_flags */
646 /* Rate value in kb/s (kilo-bit per second). */
650 /* Rate value in packet/sec. */
658 /* Collect statistics. */
663 typedef meter-band-type {
664 /* ofp_meter_band_type */
668 description "Drop packet. ";
670 enum OFPMBT_DSCP_REMARK {
672 description "Remark DSCP in the IP header. ";
674 enum OFPMBT_EXPERIMENTER {
675 value 65535; //0xFFFF
676 description "Experimenter meter band. ";
681 typedef table-config {
682 /* ofp_table_config */
684 bit OFPTC_DEPRECATED_MASK {
685 /* Deprecated bits */
691 typedef table-features-prop-type {
693 enum OFPTFPT_INSTRUCTIONS {
695 description "Instructions property.";
697 enum OFPTFPT_INSTRUCTIONS_MISS {
699 description "Instructions for table-miss.";
701 enum OFPTFPT_NEXT_TABLES {
703 description "Next Table property.";
705 enum OFPTFPT_NEXT_TABLES_MISS {
707 description "Next Table for table-miss.";
709 enum OFPTFPT_WRITE_ACTIONS {
711 description "Write Actions property.";
713 enum OFPTFPT_WRITE_ACTIONS_MISS {
715 description "Write Actions for table-miss.";
717 enum OFPTFPT_APPLY_ACTIONS {
719 description "Apply Actions property.";
721 enum OFPTFPT_APPLY_ACTIONS_MISS {
723 description "Apply Actions for table-miss.";
727 description "Match property.";
729 enum OFPTFPT_WILDCARDS {
731 description "Wildcards property.";
733 enum OFPTFPT_WRITE_SETFIELD {
735 description "Write Set-Field property.";
737 enum OFPTFPT_WRITE_SETFIELD_MISS {
739 description "Write Set-Field for table-miss.";
741 enum OFPTFPT_APPLY_SETFIELD {
743 description "Apply Set-Field property.";
745 enum OFPTFPT_APPLY_SETFIELD_MISS {
747 description "Apply Set-Field for table-miss.";
749 enum OFPTFPT_EXPERIMENTER {
751 description "Experimenter property.";
753 enum OFPTFPT_EXPERIMENTER_MISS {
754 value 65535; //0xffff
755 description "Experimenter for table-miss.";
760 typedef group-types {
764 /* All (multicast/broadcast) group. */
772 /* Indirect group. */
776 /* Fast failover group. */
782 typedef group-capabilities {
783 /* ofp_group_capabilities */
785 bit OFPGFC_SELECT_WEIGHT {
786 /* Support weight for select groups */
789 bit OFPGFC_SELECT_LIVENESS {
790 /* Support liveness for select groups */
793 bit OFPGFC_CHAINING {
794 /* Support chaining groups */
797 bit OFPGFC_CHAINING_CHECKS {
798 /* Check chaining for loops and delete */