1 module openflow-types {
2 namespace "urn:opendaylight:openflow:common:types";
5 revision "2013-07-31" {
6 //description "Initial 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;
60 typedef port-features {
61 ////description "Features of ports available in datapath.";
62 //reference "ofp_port_features";
66 //description "10 Mb half-duplex rate support.";
70 //description "10 Mb full-duplex rate support.";
74 //description "100 Mb half-duplex rate support.";
78 //description "100 Mb full-duplex rate support.";
82 //description "1 Gb half-duplex rate support.";
86 //description "1 Gb full-duplex rate support.";
90 //description "10 Gb full-duplex rate support.";
94 //description "40 Gb full-duplex rate support.";
98 //description "100 Gb full-duplex rate support.";
102 //description "1 Tb full-duplex rate support.";
106 //description "Other rate, not in the list.";
110 //description "Copper medium.";
114 //description "Fiber medium.";
118 //description "Auto-negotiation.";
122 //description "Pause.";
126 //description "Asymmetric pause.";
131 typedef port-config {
133 "Flags to indicate behavior of the physical port. These flags are
134 describe the current configuration and used port_mod message
135 to configure the port's behavior.";
138 //description " Port is administratively down.";
142 //description " Drop all packets received by port.";
146 //description " Drop packets forwarded to port.";
150 //description "Do not send packet-in msgs for port.";
158 "Current state of the physical port. These are not configurable from
162 //description "No physical link present.";
166 //description "Port is blocked";
170 //description "Live for Fast Failover Group.";
176 identity match-type-base {
178 "The match type indicates the match structure (set of fields that compose the
179 match) in use. The match type is placed in the type field at the beginning
180 of all match structures.Extensions that define match types may be
181 published on the ONF wiki. Support for extensions is optional.";
184 identity standard-match-type {
186 base oft:match-type-base;
191 // base oft:match-type-base;
194 //TODO: use identityref, when generating available
198 identity instruction {
232 description "Hello Protocol failed.";
236 description "Request was not understood.";
240 description "Error in action description.";
242 enum BAD_INSTRUCTION {
244 description "Error in instruction list.";
248 description "Error in match.";
250 enum FLOW_MOD_FAILED {
252 description "Problem modifying flow entry.";
254 enum GROUP_MOD_FAILED {
256 description "Problem modifying group entry.";
258 enum PORT_MOD_FAILED {
260 description "Port mod request failed.";
262 enum TABLE_MOD_FAILED {
264 description "Table mod request failed.";
266 enum QUEUE_OP_FAILED {
268 description "Queue operation failed.";
270 enum SWITCH_CONFIG_FAILED {
272 description "Switch config request failed.";
274 enum ROLE_REQUEST_FAILED {
276 description "Controller Role request failed.";
278 enum METER_MOD_FAILED {
280 description "Error in meter.";
282 enum TABLE_FEATURES_FAILED {
284 description "Setting table features failed.";
287 value 65535; //0xffff
288 description "Experimenter error messages.";
293 typedef hello-element-type {
297 description "Bitmap of version supported.";
302 typedef switch-config-flag {
303 /* Handling of IP fragments. */
307 description "No special handling for fragments.";
309 enum OFPC_FRAG_DROP {
311 description "Drop fragments.";
313 enum OFPC_FRAG_REASM {
315 description "Reassemble (only if OFPC_IP_REASM set).";
317 enum OFPC_FRAG_MASK {
323 typedef flow-removed-reason {
326 enum OFPRR_IDLE_TIMEOUT {
328 description "Flow idle time exceeded idle_timeout.";
330 enum OFPRR_HARD_TIMEOUT {
332 description "Time exceeded hard_timeout.";
336 description "Evicted by a DELETE flow mod.";
338 enum OFPRR_GROUP_DELETE {
340 description "Group was removed.";
345 typedef port-reason {
350 description "The port was added.";
354 description "he port was removed.";
358 description "Some attribute of the port has changed.";
363 typedef flow-mod-command {
364 /* ofp_flow_mod_command */
368 description "New flow.";
372 description "Modify all matching flows.";
374 enum OFPFC_MODIFY_STRICT {
376 description "Modify entry strictly matching wildcards and priority.";
380 description "Delete all matching flows.";
382 enum OFPFC_DELETE_STRICT {
384 description "Delete entry strictly matching wildcards and priority.";
389 typedef flow-mod-flags {
390 /* ofp_flow_mod_flags */
392 bit OFPFF_SEND_FLOW_REM {
394 /* Send flow removed message when flow expires or is deleted. */
396 bit OFPFF_CHECK_OVERLAP {
398 /* Check for overlapping entries first. */
400 bit OFPFF_RESET_COUNTS {
402 /* Reset flow packet and byte counts. */
404 bit OFPFF_NO_PKT_COUNTS {
406 /* Don't keep track of packet count. */
408 bit OFPFF_NO_BYT_COUNTS {
410 /* Don't keep track of byte count. */
415 typedef group-mod-command {
416 /* ofp_group_mod_command */
420 description "New group.";
424 description "Modify all matching groups.";
428 description "Delete all matching groups.";
440 description "All (multicast/broadcast) group.";
444 description "Select group.";
446 enum OFPGT_INDIRECT {
448 description "Indirect group.";
452 description "Fast failover group.";
457 typedef multipart-request-flags {
459 "enum ofp_multipart_request_flags ";
461 bit OFPMPF_REQ_MORE {
462 //description "More requests to follow.";
468 typedef multipart-type {
469 /* ofp_multipart_type */
473 description "Description of this OpenFlow switch.
474 The request body is empty.
475 The reply body is struct ofp_desc.";
479 description "Individual flow statistics.
480 The request body is struct ofp_flow_stats_request.
481 The reply body is an array of struct ofp_flow_stats.";
483 enum OFPMP_AGGREGATE {
485 description "Aggregate flow statistics.
486 The request body is struct ofp_aggregate_stats_request.
487 The reply body is struct ofp_aggregate_stats_reply.";
491 description "Flow table statistics.
492 The request body is empty.
493 The reply body is an array of struct ofp_table_stats.";
495 enum OFPMP_PORT_STATS {
497 description "Port statistics.
498 The request body is struct ofp_port_stats_request.
499 The reply body is an array of struct ofp_port_stats.";
503 description "Queue statistics for a port
504 The request body is struct ofp_queue_stats_request.
505 The reply body is an array of struct ofp_queue_stats";
509 description "Group counter statistics.
510 The request body is struct ofp_group_stats_request.
511 The reply is an array of struct ofp_group_stats.";
513 enum OFPMP_GROUP_DESC {
515 description "Group description.
516 The request body is empty.
517 The reply body is an array of struct ofp_group_desc.";
519 enum OFPMP_GROUP_FEATURES {
521 description "Group features.
522 The request body is empty.
523 The reply body is struct ofp_group_features.";
527 description "Meter statistics.
528 The request body is struct ofp_meter_multipart_requests.
529 The reply body is an array of struct ofp_meter_stats.";
531 enum OFPMP_METER_CONFIG {
533 description "Meter configuration.
534 The request body is struct ofp_meter_multipart_requests.
535 The reply body is an array of struct ofp_meter_config.";
537 enum OFPMP_METER_FEATURES {
539 description "Meter features.
540 The request body is empty.
541 The reply body is struct ofp_meter_features.";
543 enum OFPMP_TABLE_FEATURES {
545 description "Table features.
546 The request body is either empty or contains an array of
547 struct ofp_table_features containing the controller’s
548 desired view of the switch. If the switch is unable to
549 set the specified view an error is returned.
550 The reply body is an array of struct ofp_table_features.";
552 enum OFPMP_PORT_DESC {
554 description "Port description.
555 The request body is empty.
556 The reply body is an array of struct ofp_port.";
558 enum OFPMP_EXPERIMENTER {
559 value 65535; //0xffff
560 description "Experimenter extension.
561 The request and reply bodies begin with
562 struct ofp_experimenter_multipart_header.
563 The request and reply bodies are otherwise experimenter-defined.";
568 typedef queue-property {
569 /* ofp_queue_properties */
573 description "All (multicast/broadcast) group.";
575 enum OFPQT_MIN_RATE {
577 description "Minimum datarate guaranteed.";
579 enum OFPQT_MAX_RATE {
581 description "Maximum datarate.";
583 enum OFPQT_EXPERIMENTER {
584 value 65535; // 0xffff
585 description "Experimenter defined property.";
590 typedef controller-role {
591 /* ofp_controller_role */
593 enum OFPCR_ROLE_NOCHANGE {
595 description "Don’t change current role.";
597 enum OFPCR_ROLE_EQUAL {
599 description "Default role, full access.";
601 enum OFPCR_ROLE_MASTER {
603 description "Full access, at most one master.";
605 enum OFPCR_ROLE_SLAVE {
607 description "Read-only access.";
612 typedef packet-in-reason {
613 /* ofp_packet_in_reason */
617 description "No matching flow (table-miss flow entry). ";
621 description "Action explicitly output to controller. ";
623 enum OFPR_INVALID_TTL {
625 description "Packet has invalid TTL ";
630 typedef meter-mod-command {
631 /* ofp_meter_mod_command */
634 description "New meter. ";
637 description "Modify specified meter. ";
640 description "Delete specified meter. ";
646 typedef meter-flags {
647 /* ofp_meter_flags */
651 /* Rate value in kb/s (kilo-bit per second). */
655 /* Rate value in packet/sec. */
663 /* Collect statistics. */
668 typedef meter-band-type {
669 /* ofp_meter_band_type */
673 description "Drop packet. ";
675 enum OFPMBT_DSCP_REMARK {
677 description "Remark DSCP in the IP header. ";
679 enum OFPMBT_EXPERIMENTER {
680 value 65535; //0xFFFF
681 description "Experimenter meter band. ";
687 typedef table-config {
688 /* ofp_table_config */
690 bit OFPTC_DEPRECATED_MASK {
691 /* Deprecated bits */
697 typedef table-features-prop-type {
699 enum OFPTFPT_INSTRUCTIONS {
701 description "Instructions property.";
703 enum OFPTFPT_INSTRUCTIONS_MISS {
705 description "Instructions for table-miss.";
707 enum OFPTFPT_NEXT_TABLES {
709 description "Next Table property.";
711 enum OFPTFPT_NEXT_TABLES_MISS {
713 description "Next Table for table-miss.";
715 enum OFPTFPT_WRITE_ACTIONS {
717 description "Write Actions property.";
719 enum OFPTFPT_WRITE_ACTIONS_MISS {
721 description "Write Actions for table-miss.";
723 enum OFPTFPT_APPLY_ACTIONS {
725 description "Apply Actions property.";
727 enum OFPTFPT_APPLY_ACTIONS_MISS {
729 description "Apply Actions for table-miss.";
733 description "Match property.";
735 enum OFPTFPT_WILDCARDS {
737 description "Wildcards property.";
739 enum OFPTFPT_WRITE_SETFIELD {
741 description "Write Set-Field property.";
743 enum OFPTFPT_WRITE_SETFIELD_MISS {
745 description "Write Set-Field for table-miss.";
747 enum OFPTFPT_APPLY_SETFIELD {
749 description "Apply Set-Field property.";
751 enum OFPTFPT_APPLY_SETFIELD_MISS {
753 description "Apply Set-Field for table-miss.";
755 enum OFPTFPT_EXPERIMENTER {
757 description "Experimenter property.";
759 enum OFPTFPT_EXPERIMENTER_MISS {
760 value 65535; //0xffff
761 description "Experimenter for table-miss.";
766 typedef group-types {
770 /* All (multicast/broadcast) group. */
778 /* Indirect group. */
782 /* Fast failover group. */
788 typedef group-capabilities {
789 /* ofp_group_capabilities */
791 bit OFPGFC_SELECT_WEIGHT {
792 /* Support weight for select groups */
795 bit OFPGFC_SELECT_LIVENESS {
796 /* Support liveness for select groups */
799 bit OFPGFC_CHAINING {
800 /* Support chaining groups */
803 bit OFPGFC_CHAINING_CHECKS {
804 /* Check chaining for loops and delete */