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 port-features {
16 ////description "Features of ports available in datapath.";
17 //reference "ofp_port_features";
21 //description "10 Mb half-duplex rate support.";
25 //description "10 Mb full-duplex rate support.";
29 //description "100 Mb half-duplex rate support.";
33 //description "100 Mb full-duplex rate support.";
37 //description "1 Gb half-duplex rate support.";
41 //description "1 Gb full-duplex rate support.";
45 //description "10 Gb full-duplex rate support.";
49 //description "40 Gb full-duplex rate support.";
53 //description "100 Gb full-duplex rate support.";
57 //description "1 Tb full-duplex rate support.";
61 //description "Other rate, not in the list.";
65 //description "Copper medium.";
69 //description "Fiber medium.";
73 //description "Auto-negotiation.";
77 //description "Pause.";
81 //description "Asymmetric pause.";
88 "Flags to indicate behavior of the physical port. These flags are
89 describe the current configuration and used port_mod message
90 to configure the port's behavior.";
93 //description " Port is administratively down.";
97 //description " Drop all packets received by port.";
101 //description " Drop packets forwarded to port.";
105 //description "Do not send packet-in msgs for port.";
113 "Current state of the physical port. These are not configurable from
117 //description "No physical link present.";
121 //description "Port is blocked";
125 //description "Live for Fast Failover Group.";
131 identity match-type-base {
133 "The match type indicates the match structure (set of fields that compose the
134 match) in use. The match type is placed in the type field at the beginning
135 of all match structures.Extensions that define match types may be
136 published on the ONF wiki. Support for extensions is optional.";
139 identity standard-match-type {
141 base oft:match-type-base;
144 typedef oxm-match-type {
146 base oft:match-type-base;
150 identity instruction {
181 description "Hello Protocol failed.";
185 description "Request was not understood.";
189 description "Error in action description.";
191 enum BAD_INSTRUCTION {
193 description "Error in instruction list.";
197 description "Error in match.";
199 enum FLOW_MOD_FAILED {
201 description "Problem modifying flow entry.";
203 enum GROUP_MOD_FAILED {
205 description "Problem modifying group entry.";
207 enum PORT_MOD_FAILED {
209 description "Port mod request failed.";
211 enum TABLE_MOD_FAILED {
213 description "Table mod request failed.";
215 enum QUEUE_OP_FAILED {
217 description "Queue operation failed.";
219 enum SWITCH_CONFIG_FAILED {
221 description "Switch config request failed.";
223 enum ROLE_REQUEST_FAILED {
225 description "Controller Role request failed.";
227 enum METER_MOD_FAILED {
229 description "Error in meter.";
231 enum TABLE_FEATURES_FAILED {
233 description "Setting table features failed.";
236 value 65535; //0xffff
237 description "Experimenter error messages.";
242 typedef hello-element-type {
246 description "Bitmap of version supported.";
251 typedef switch-config-flag {
252 /* Handling of IP fragments. */
256 description "No special handling for fragments.";
258 enum OFPC_FRAG_DROP {
260 description "Drop fragments.";
262 enum OFPC_FRAG_REASM {
264 description "Reassemble (only if OFPC_IP_REASM set).";
266 enum OFPC_FRAG_MASK {
272 typedef flow-removed-reason {
275 enum OFPRR_IDLE_TIMEOUT {
277 description "Flow idle time exceeded idle_timeout.";
279 enum OFPRR_HARD_TIMEOUT {
281 description "Time exceeded hard_timeout.";
285 description "Evicted by a DELETE flow mod.";
287 enum OFPRR_GROUP_DELETE {
289 description "Group was removed.";
294 typedef port-reason {
299 description "The port was added.";
303 description "he port was removed.";
307 description "Some attribute of the port has changed.";
312 typedef flow-mod-command {
313 /* ofp_flow_mod_command */
317 description "New flow.";
321 description "Modify all matching flows.";
323 enum OFPFC_MODIFY_STRICT {
325 description "Modify entry strictly matching wildcards and priority.";
329 description "Delete all matching flows.";
331 enum OFPFC_DELETE_STRICT {
333 description "Delete entry strictly matching wildcards and priority.";
338 typedef flow-mod-flags {
339 /* ofp_flow_mod_flags */
341 bit OFPFF_SEND_FLOW_REM {
343 /* Send flow removed message when flow expires or is deleted. */
345 bit OFPFF_CHECK_OVERLAP {
347 /* Check for overlapping entries first. */
349 bit OFPFF_RESET_COUNTS {
351 /* Reset flow packet and byte counts. */
353 bit OFPFF_NO_PKT_COUNTS {
355 /* Don't keep track of packet count. */
357 bit OFPFF_NO_BYT_COUNTS {
359 /* Don't keep track of byte count. */
364 typedef group-mod-command {
365 /* ofp_group_mod_command */
369 description "New group.";
373 description "Modify all matching groups.";
377 description "Delete all matching groups.";
388 description "All (multicast/broadcast) group.";
392 description "Select group.";
394 enum OFPGT_INDIRECT {
396 description "Indirect group.";
400 description "Fast failover group.";
405 typedef multipart-request-flags {
407 "enum ofp_multipart_request_flags ";
409 bit OFPMPF_REQ_MORE {
410 //description "More requests to follow.";
416 typedef multipart-type {
417 /* ofp_multipart_type */
421 description "Description of this OpenFlow switch.
422 The request body is empty.
423 The reply body is struct ofp_desc.";
427 description "Individual flow statistics.
428 The request body is struct ofp_flow_stats_request.
429 The reply body is an array of struct ofp_flow_stats.";
431 enum OFPMP_AGGREGATE {
433 description "Aggregate flow statistics.
434 The request body is struct ofp_aggregate_stats_request.
435 The reply body is struct ofp_aggregate_stats_reply.";
439 description "Flow table statistics.
440 The request body is empty.
441 The reply body is an array of struct ofp_table_stats.";
443 enum OFPMP_PORT_STATS {
445 description "Port statistics.
446 The request body is struct ofp_port_stats_request.
447 The reply body is an array of struct ofp_port_stats.";
451 description "Queue statistics for a port
452 The request body is struct ofp_queue_stats_request.
453 The reply body is an array of struct ofp_queue_stats";
457 description "Group counter statistics.
458 The request body is struct ofp_group_stats_request.
459 The reply is an array of struct ofp_group_stats.";
461 enum OFPMP_GROUP_DESC {
463 description "Group description.
464 The request body is empty.
465 The reply body is an array of struct ofp_group_desc.";
467 enum OFPMP_GROUP_FEATURES {
469 description "Group features.
470 The request body is empty.
471 The reply body is struct ofp_group_features.";
475 description "Meter statistics.
476 The request body is struct ofp_meter_multipart_requests.
477 The reply body is an array of struct ofp_meter_stats.";
479 enum OFPMP_METER_CONFIG {
481 description "Meter configuration.
482 The request body is struct ofp_meter_multipart_requests.
483 The reply body is an array of struct ofp_meter_config.";
485 enum OFPMP_METER_FEATURES {
487 description "Meter features.
488 The request body is empty.
489 The reply body is struct ofp_meter_features.";
491 enum OFPMP_TABLE_FEATURES {
493 description "Table features.
494 The request body is either empty or contains an array of
495 struct ofp_table_features containing the controller’s
496 desired view of the switch. If the switch is unable to
497 set the specified view an error is returned.
498 The reply body is an array of struct ofp_table_features.";
500 enum OFPMP_PORT_DESC {
502 description "Port description.
503 The request body is empty.
504 The reply body is an array of struct ofp_port.";
506 enum OFPMP_EXPERIMENTER {
507 value 65535; //0xffff
508 description "Experimenter extension.
509 The request and reply bodies begin with
510 struct ofp_experimenter_multipart_header.
511 The request and reply bodies are otherwise experimenter-defined.";
516 typedef queue-properties {
517 /* ofp_queue_properties */
521 description "All (multicast/broadcast) group.";
523 enum OFPQT_MIN_RATE {
525 description "Minimum datarate guaranteed.";
527 enum OFPQT_MAX_RATE {
529 description "Maximum datarate.";
531 enum OFPQT_EXPERIMENTER {
532 value 65535; // 0xffff
533 description "Experimenter defined property.";
538 typedef controller-role {
539 /* ofp_controller_role */
541 enum OFPCR_ROLE_NOCHANGE {
543 description "Don’t change current role.";
545 enum OFPCR_ROLE_EQUAL {
547 description "Default role, full access.";
549 enum OFPCR_ROLE_MASTER {
551 description "Full access, at most one master.";
553 enum OFPCR_ROLE_SLAVE {
555 description "Read-only access.";
560 typedef packet-in-reason {
561 /* ofp_packet_in_reason */
565 description "No matching flow (table-miss flow entry). ";
569 description "Action explicitly output to controller. ";
571 enum OFPR_INVALID_TTL {
573 description "Packet has invalid TTL ";
578 typedef action-type {
579 /* ofp_action_type */
583 /* Output to switch port. */
585 bit OFPAT_COPY_TTL_OUT {
587 /* Copy TTL "outwards" -- from next-to-outermost to outermost */
589 bit OFPAT_COPY_TTL_IN {
591 /* Copy TTL "inwards" -- from outermost to next-to-outermost */
593 bit OFPAT_SET_MPLS_TTL {
597 bit OFPAT_DEC_MPLS_TTL {
599 /* Decrement MPLS TTL */
601 bit OFPAT_PUSH_VLAN {
603 /* Push a new VLAN tag */
607 /* Pop the outer VLAN tag */
609 bit OFPAT_PUSH_MPLS {
611 /* Push a new MPLS tag */
615 /* Pop the outer MPLS tag */
617 bit OFPAT_SET_QUEUE {
619 /* Set queue id when outputting to a port */
625 bit OFPAT_SET_NW_TTL {
629 bit OFPAT_DEC_NW_TTL {
631 /* Decrement IP TTL. */
633 bit OFPAT_SET_FIELD {
635 /* Set a header field using OXM TLV format. */
639 /* Push a new PBB service tag (I-TAG) */
643 /* Pop the outer PBB service tag (I-TAG) */
645 bit OFPAT_EXPERIMENTER {
651 typedef meter-mod-command {
652 /* ofp_meter_mod_command */
655 description "New meter. ";
658 description "Modify specified meter. ";
661 description "Delete specified meter. ";
666 typedef meter-flags {
667 /* ofp_meter_flags */
671 /* Rate value in kb/s (kilo-bit per second). */
675 /* Rate value in packet/sec. */
683 /* Collect statistics. */
688 typedef meter-band-type {
689 /* ofp_meter_band_type */
693 description "Drop packet. ";
695 enum OFPMBT_DSCP_REMARK {
697 description "Remark DSCP in the IP header. ";
699 enum OFPMBT_EXPERIMENTER {
700 value 65535; //0xFFFF
701 description "Experimenter meter band. ";
706 typedef table-config {
707 /* ofp_table_config */
709 bit OFPTC_DEPRECATED_MASK {
710 /* Deprecated bits */
716 typedef table-features-prop-type {
718 enum OFPTFPT_INSTRUCTIONS {
720 description "Instructions property.";
722 enum OFPTFPT_INSTRUCTIONS_MISS {
724 description "Instructions for table-miss.";
726 enum OFPTFPT_NEXT_TABLES {
728 description "Next Table property.";
730 enum OFPTFPT_NEXT_TABLES_MISS {
732 description "Next Table for table-miss.";
734 enum OFPTFPT_WRITE_ACTIONS {
736 description "Write Actions property.";
738 enum OFPTFPT_WRITE_ACTIONS_MISS {
740 description "Write Actions for table-miss.";
742 enum OFPTFPT_APPLY_ACTIONS {
744 description "Apply Actions property.";
746 enum OFPTFPT_APPLY_ACTIONS_MISS {
748 description "Apply Actions for table-miss.";
752 description "Match property.";
754 enum OFPTFPT_WILDCARDS {
756 description "Wildcards property.";
758 enum OFPTFPT_WRITE_SETFIELD {
760 description "Write Set-Field property.";
762 enum OFPTFPT_WRITE_SETFIELD_MISS {
764 description "Write Set-Field for table-miss.";
766 enum OFPTFPT_APPLY_SETFIELD {
768 description "Apply Set-Field property.";
770 enum OFPTFPT_APPLY_SETFIELD_MISS {
772 description "Apply Set-Field for table-miss.";
774 enum OFPTFPT_EXPERIMENTER {
776 description "Experimenter property.";
778 enum OFPTFPT_EXPERIMENTER_MISS {
779 value 65535; //0xffff
780 description "Experimenter for table-miss.";
785 typedef group-types {
789 /* All (multicast/broadcast) group. */
797 /* Indirect group. */
801 /* Fast failover group. */
807 typedef group-capabilities {
808 /* ofp_group_capabilities */
810 bit OFPGFC_SELECT_WEIGHT {
811 /* Support weight for select groups */
814 bit OFPGFC_SELECT_LIVENESS {
815 /* Support liveness for select groups */
818 bit OFPGFC_CHAINING {
819 /* Support chaining groups */
822 bit OFPGFC_CHAINING_CHECKS {
823 /* Check chaining for loops and delete */