blob: 3b15ebf12ca9333ab2ba5483cacd9a9e34c5480a [file] [log] [blame]
Stephane Barbarie14088962017-06-01 16:56:55 -04001
2module voltha {
3
4
5
6
7
8 namespace "urn:opencord:params:xml:ns:voltha:voltha";
9 prefix voltha;
10
11 organization "CORD";
12 contact
13 " Any name";
14
15 description
16 "";
17
18 revision "2016-11-15" {
19 description "Initial revision.";
20 reference "reference";
21 }
22
23
24 grouping DeviceGroup {
25 description
26 "";
27 leaf id {
28 type string;
29 description
30 "";
31 }
32
33 list logical_devices {
34 key "id";
35 uses LogicalDevice;
36
37 description
38 "";
39 }
40
41 list devices {
42 key "id";
43 uses Device;
44
45 description
46 "";
47 }
48
49
50
51 }
52
53 grouping DeviceGroups {
54 description
55 "";
56 list items {
57 key "id";
58 uses DeviceGroup;
59
60 description
61 "";
62 }
63
64
65
66 }
67
68 typedef AlarmFilterRuleKey {
69 type enumeration {
70 enum id {
71 description "";
72 }
73 enum type {
74 description "";
75 }
76 enum severity {
77 description "";
78 }
79 enum resource_id {
80 description "";
81 }
82 enum category {
83 description "";
84 }
85 enum device_id {
86 description "";
87 }
88 }
89 description
90 "";
91 }
92
93 grouping AlarmFilterRule {
94 description
95 "";
96 leaf key {
97 type AlarmFilterRuleKey;
98
99 description
100 "";
101 }
102
103 leaf value {
104 type string;
105 description
106 "";
107 }
108
109
110
111 }
112
113 grouping AlarmFilter {
114 description
115 "";
116 leaf id {
117 type string;
118 description
119 "";
120 }
121
122 list rules {
123 key "key";
124 uses AlarmFilterRule;
125
126 description
127 "";
128 }
129
130
131
132 }
133
134 grouping AlarmFilters {
135 description
136 "";
137 list filters {
138 key "id";
139 uses AlarmFilter;
140
141 description
142 "";
143 }
144
145
146
147 }
148
149 container VolthaInstance {
150 description
151 "Top-level (root) node for a Voltha Instance";
152 leaf instance_id {
153 type string;
154 description
155 "";
156 }
157
158 leaf version {
159 type string;
160 description
161 "";
162 }
163
164 leaf log_level {
165 type LogLevel;
166
167 description
168 "";
169 }
170
171 container health {
172 uses HealthStatus;
173
174 description
175 "";
176 }
177
178 list adapters {
179 key "id";
180 uses Adapter;
181
182 description
183 "";
184 }
185
186 list logical_devices {
187 key "id";
188 uses LogicalDevice;
189
190 description
191 "";
192 }
193
194 list devices {
195 key "id";
196 uses Device;
197
198 description
199 "";
200 }
201
202 list device_types {
203 key "id";
204 uses DeviceType;
205
206 description
207 "";
208 }
209
210 list device_groups {
211 key "id";
212 uses DeviceGroup;
213
214 description
215 "";
216 }
217
218 list alarm_filters {
219 key "id";
220 uses AlarmFilter;
221
222 description
223 "";
224 }
225
226
227
228 }
229
230 container VolthaInstances {
231 description
232 "";
233 list items {
234 key "items";
235 leaf items {
236 type string;
237 description
238 "";
239 }
240 description
241 "";
242 }
243
244
245
246 }
247
248 container Voltha {
249 description
250 "Voltha representing the entire Voltha cluster";
251 leaf version {
252 type string;
253 description
254 "";
255 }
256
257 leaf log_level {
258 type LogLevel;
259
260 description
261 "";
262 }
263
264 list instances {
265 key "instance_id";
266 uses VolthaInstance_grouping;
267 description
268 "";
269 }
270
271 list adapters {
272 key "id";
273 uses Adapter;
274
275 description
276 "";
277 }
278
279 list logical_devices {
280 key "id";
281 uses LogicalDevice;
282
283 description
284 "";
285 }
286
287 list devices {
288 key "id";
289 uses Device;
290
291 description
292 "";
293 }
294
295 list device_groups {
296 key "id";
297 uses DeviceGroup;
298
299 description
300 "";
301 }
302
303
304
305 }
306
307 grouping VolthaInstance_grouping {
308 description
309 "Top-level (root) node for a Voltha Instance";
310 leaf instance_id {
311 type string;
312 description
313 "";
314 }
315
316 leaf version {
317 type string;
318 description
319 "";
320 }
321
322 leaf log_level {
323 type LogLevel;
324
325 description
326 "";
327 }
328
329 container health {
330 uses HealthStatus;
331
332 description
333 "";
334 }
335
336 list adapters {
337 key "id";
338 uses Adapter;
339
340 description
341 "";
342 }
343
344 list logical_devices {
345 key "id";
346 uses LogicalDevice;
347
348 description
349 "";
350 }
351
352 list devices {
353 key "id";
354 uses Device;
355
356 description
357 "";
358 }
359
360 list device_types {
361 key "id";
362 uses DeviceType;
363
364 description
365 "";
366 }
367
368 list device_groups {
369 key "id";
370 uses DeviceGroup;
371
372 description
373 "";
374 }
375
376 list alarm_filters {
377 key "id";
378 uses AlarmFilter;
379
380 description
381 "";
382 }
383
384
385
386 }
387
388 grouping VolthaInstances_grouping {
389 description
390 "";
391 list items {
392 key "items";
393 leaf items {
394 type string;
395 description
396 "";
397 }
398 description
399 "";
400 }
401
402
403
404 }
405
406 grouping Voltha_grouping {
407 description
408 "Voltha representing the entire Voltha cluster";
409 leaf version {
410 type string;
411 description
412 "";
413 }
414
415 leaf log_level {
416 type LogLevel;
417
418 description
419 "";
420 }
421
422 list instances {
423 key "instance_id";
424 uses VolthaInstance_grouping;
425 description
426 "";
427 }
428
429 list adapters {
430 key "id";
431 uses Adapter;
432
433 description
434 "";
435 }
436
437 list logical_devices {
438 key "id";
439 uses LogicalDevice;
440
441 description
442 "";
443 }
444
445 list devices {
446 key "id";
447 uses Device;
448
449 description
450 "";
451 }
452
453 list device_groups {
454 key "id";
455 uses DeviceGroup;
456
457 description
458 "";
459 }
460
461
462
463 }
464
465 grouping AdapterConfig {
466 description
467 "";
468 leaf log_level {
469 type LogLevel;
470
471 description
472 "Common adapter config attributes here";
473 }
474
475 container additional_config {
476 uses Any;
477
478 description
479 "Custom (vendor-specific) configuration attributes";
480 }
481
482
483
484 }
485
486 grouping Adapter {
487 description
488 "Adapter (software plugin)";
489 leaf id {
490 type string;
491 description
492 "Unique name of adapter, matching the python packate name under
493 voltha adapters.";
494 }
495
496 leaf vendor {
497 type string;
498 description
499 "";
500 }
501
502 leaf version {
503 type string;
504 description
505 "";
506 }
507
508 container config {
509 uses AdapterConfig;
510
511 description
512 "Adapter configuration";
513 }
514
515 container additional_description {
516 uses Any;
517
518 description
519 "Custom descriptors and custom configuration";
520 }
521
522 list logical_device_ids {
523 key "logical_device_ids";
524 leaf logical_device_ids {
525 type string;
526 description
527 "Logical devices owned ";
528 }
529 description
530 "Logical devices owned ";
531 }
532
533
534
535 }
536
537 grouping Adapters {
538 description
539 "";
540 list items {
541 key "id";
542 uses Adapter;
543
544 description
545 "";
546 }
547
548
549
550 }
551
552 grouping Any {
553 description
554 "`Any` contains an arbitrary serialized protocol buffer message along with a
555 URL that describes the type of the serialized message.
556
557 Protobuf library provides support to pack unpack Any values in the form
558 of utility functions or additional generated methods of the Any type.
559
560 Example 1: Pack and unpack a message in C++.
561
562 Foo foo = ...;
563 Any any;
564 any.PackFrom(foo);
565 ...
566 if (any.UnpackTo(&foo))
567 ...
568
569
570 Example 2: Pack and unpack a message in Java.
571
572 Foo foo = ...;
573 Any any = Any.pack(foo);
574 ...
575 if (any.is(Foo.class))
576 foo = any.unpack(Foo.class);
577
578
579 Example 3: Pack and unpack a message in Python.
580
581 foo = Foo(...)
582 any = Any()
583 any.Pack(foo)
584 ...
585 if any.Is(Foo.DESCRIPTOR):
586 any.Unpack(foo)
587 ...
588
589 The pack methods provided by protobuf library will by default use
590 'type.googleapis.com full.type.name' as the type URL and the unpack
591 methods only use the fully qualified type name after the last ' '
592 in the type URL, for example foo.bar.com x y.z will yield type
593 name y.z .
594
595
596 JSON
597 ====
598 The JSON representation of an `Any` value uses the regular
599 representation of the deserialized, embedded message, with an
600 additional field `@type` which contains the type URL. Example:
601
602 package google.profile;
603 message Person
604 string first_name = 1;
605 string last_name = 2;
606
607
608
609 @type : type.googleapis.com google.profile.Person ,
610 firstName : string ,
611 lastName : string
612
613
614 If the embedded message type is well-known and has a custom JSON
615 representation, that representation will be embedded adding a field
616 `value` which holds the custom JSON in addition to the `@type`
617 field. Example (for message google.protobuf.Duration ):
618
619
620 @type : type.googleapis.com google.protobuf.Duration ,
621 value : 1.212s
622 ";
623 leaf type_url {
624 type string;
625 description
626 "A URL resource name whose content describes the type of the
627 serialized protocol buffer message.
628
629 For URLs which use the scheme `http`, `https`, or no scheme, the
630 following restrictions and interpretations apply:
631
632 If no scheme is provided, `https` is assumed.
633 The last segment of the URL's path must represent the fully
634 qualified name of the type (as in `path google.protobuf.Duration`).
635 The name should be in a canonical form (e.g., leading . is
636 not accepted).
637 An HTTP GET on the URL must yield a google.protobuf.Type
638 value in binary format, or produce an error.
639 Applications are allowed to cache lookup results based on the
640 URL, or have them precompiled into a binary to avoid any
641 lookup. Therefore, binary compatibility needs to be preserved
642 on changes to types. (Use versioned type names to manage
643 breaking changes.)
644
645 Schemes other than `http`, `https` (or the empty scheme) might be
646 used with implementation specific semantics.";
647 }
648
649 leaf value {
650 type binary;
651 description
652 "Must be a valid serialized protocol buffer of the above specified type.";
653 }
654
655
656
657 }
658
659 typedef LogLevel {
660 type enumeration {
661 enum DEBUG {
662 description "";
663 }
664 enum INFO {
665 description "";
666 }
667 enum WARNING {
668 description "";
669 }
670 enum ERROR {
671 description "";
672 }
673 enum CRITICAL {
674 description "";
675 }
676 }
677 description
678 "Logging verbosity level";
679 }
680 typedef AdminState {
681 type enumeration {
682 enum UNKNOWN {
683 description "";
684 }
685 enum PREPROVISIONED {
686 description "";
687 }
688 enum ENABLED {
689 description "";
690 }
691 enum DISABLED {
692 description "";
693 }
694 }
695 description
696 "Administrative State";
697 }
698 typedef OperStatus {
699 type enumeration {
700 enum UNKNOWN {
701 description "";
702 }
703 enum DISCOVERED {
704 description "";
705 }
706 enum ACTIVATING {
707 description "";
708 }
709 enum TESTING {
710 description "";
711 }
712 enum ACTIVE {
713 description "";
714 }
715 enum FAILED {
716 description "";
717 }
718 }
719 description
720 "Operational Status";
721 }
722 typedef ConnectStatus {
723 type enumeration {
724 enum UNKNOWN {
725 description "";
726 }
727 enum UNREACHABLE {
728 description "";
729 }
730 enum REACHABLE {
731 description "";
732 }
733 }
734 description
735 "Connectivity Status";
736 }
737
738 grouping ID {
739 description
740 "Convey a resource identifier";
741 leaf id {
742 type string;
743 description
744 "";
745 }
746
747
748
749 }
750
751 typedef PortType {
752 type enumeration {
753 enum UNKNOWN {
754 description "";
755 }
756 enum ETHERNET_NNI {
757 description "";
758 }
759 enum ETHERNET_UNI {
760 description "";
761 }
762 enum PON_OLT {
763 description "";
764 }
765 enum PON_ONU {
766 description "";
767 }
768 }
769 description
770 "";
771 }
772
773 grouping DeviceType {
774 description
775 "A Device Type";
776 leaf id {
777 type string;
778 description
779 "Unique name for the device type";
780 }
781
782 leaf adapter {
783 type string;
784 description
785 "Name of the adapter that handles device type";
786 }
787
788 leaf accepts_bulk_flow_update {
789 type boolean;
790 description
791 "Capabilitities";
792 }
793
794 leaf accepts_add_remove_flow_updates {
795 type boolean;
796 description
797 "";
798 }
799
800
801
802 }
803
804 grouping DeviceTypes {
805 description
806 "A plurality of device types";
807 list items {
808 key "id";
809 uses DeviceType;
810
811 description
812 "";
813 }
814
815
816
817 }
818
819 grouping PmConfig {
820 description
821 "";
822 leaf name {
823 type string;
824 description
825 "";
826 }
827
828 leaf type {
829 type PmType;
830 description
831 "";
832 }
833
834 leaf enabled {
835 type boolean;
836 description
837 "Whether or not this metric makes it to Kafka";
838 }
839
840 leaf sample_freq {
841 type uint32;
842 description
843 "Sample rate in 10ths of a second";
844 }
845
846
847
848 typedef PmType {
849 type enumeration {
850 enum COUNTER {
851 description "";
852 }
853 enum GUAGE {
854 description "";
855 }
856 enum STATE {
857 description "";
858 }
859 }
860 description
861 "";
862 }
863
864 }
865
866 grouping PmGroupConfig {
867 description
868 "";
869 leaf group_name {
870 type string;
871 description
872 "";
873 }
874
875 leaf group_freq {
876 type uint32;
877 description
878 "Frequency applicable to the grop";
879 }
880
881 leaf enabled {
882 type boolean;
883 description
884 "Enable disable group level only";
885 }
886
887 list metrics {
888 key "name";
889 uses PmConfig;
890
891 description
892 "";
893 }
894
895
896
897 }
898
899 grouping PmConfigs {
900 description
901 "";
902 leaf id {
903 type string;
904 description
905 "To work around a chameleon POST bug";
906 }
907
908 leaf default_freq {
909 type uint32;
910 description
911 "Default sample rate";
912 }
913
914 leaf grouped {
915 type boolean;
916 description
917 "Forces group names and group semantics";
918 }
919
920 leaf freq_override {
921 type boolean;
922 description
923 "Allows Pm to set an individual sample frequency";
924 }
925
926 list groups {
927 key "group_name";
928 uses PmGroupConfig;
929
930 description
931 "The groups if grouped is true";
932 }
933
934 list metrics {
935 key "name";
936 uses PmConfig;
937
938 description
939 "The metrics themselves if grouped is false.";
940 }
941
942
943
944 }
945
946 grouping PeerPort {
947 description
948 "";
949 leaf device_id {
950 type string;
951 description
952 "";
953 }
954
955 leaf port_no {
956 type uint32;
957 description
958 "";
959 }
960
961
962
963 }
964
965 grouping Port {
966 description
967 "";
968 leaf port_no {
969 type uint32;
970 description
971 "Device-unique port number";
972 }
973
974 leaf label {
975 type string;
976 description
977 "Arbitrary port label";
978 }
979
980 leaf type {
981 type PortType;
982 description
983 "Type of port";
984 }
985
986 leaf admin_state {
987 type AdminState;
988
989 description
990 "";
991 }
992
993 leaf oper_status {
994 type OperStatus;
995
996 description
997 "";
998 }
999
1000 leaf device_id {
1001 type string;
1002 description
1003 "Unique .id of device that owns this port";
1004 }
1005
1006 list peers {
1007 key "device_id";
1008 uses PeerPort;
1009 description
1010 "";
1011 }
1012
1013
1014
1015 }
1016
1017 grouping Ports {
1018 description
1019 "";
1020 list items {
1021 key "port_no";
1022 uses Port;
1023
1024 description
1025 "";
1026 }
1027
1028
1029
1030 }
1031
1032 grouping ProxyAddress {
1033 description
1034 "";
1035 leaf device_id {
1036 type string;
1037 description
1038 "Which device to use as proxy to this device";
1039 }
1040
1041 leaf channel_id {
1042 type uint32;
1043 description
1044 "Sub-address within proxy";
1045 }
1046
1047 leaf onu_id {
1048 type uint32;
1049 description
1050 "onu identifier; optional";
1051 }
1052
1053 leaf onu_session_id {
1054 type uint32;
1055 description
1056 "session identifier for the ONU; optional";
1057 }
1058
1059
1060
1061 }
1062
1063 grouping Device {
1064 description
1065 "A Physical Device instance";
1066 leaf id {
1067 type string;
1068 description
1069 "Voltha's device identifier";
1070 }
1071
1072 leaf type {
1073 type string;
1074 description
1075 "Device type, refers to one of the registered device types";
1076 }
1077
1078 leaf root {
1079 type boolean;
1080 description
1081 "Is this device a root device. Each logical switch has one root
1082 device that is associated with the logical flow switch.";
1083 }
1084
1085 leaf parent_id {
1086 type string;
1087 description
1088 "Parent device id, in the device tree (for a root device, the parent_id
1089 is the logical_device.id)";
1090 }
1091
1092 leaf parent_port_no {
1093 type uint32;
1094 description
1095 "";
1096 }
1097
1098 leaf vendor {
1099 type string;
1100 description
1101 "Vendor, version, serial number, etc.";
1102 }
1103
1104 leaf model {
1105 type string;
1106 description
1107 "";
1108 }
1109
1110 leaf hardware_version {
1111 type string;
1112 description
1113 "";
1114 }
1115
1116 leaf firmware_version {
1117 type string;
1118 description
1119 "";
1120 }
1121
1122 leaf software_version {
1123 type string;
1124 description
1125 "";
1126 }
1127
1128 leaf serial_number {
1129 type string;
1130 description
1131 "";
1132 }
1133
1134 leaf adapter {
1135 type string;
1136 description
1137 "Addapter that takes care of device";
1138 }
1139
1140 leaf vlan {
1141 type uint32;
1142 description
1143 "Device contact on vlan (if 0, no vlan)";
1144 }
1145
1146 container proxy_address {
1147 uses ProxyAddress;
1148 description
1149 "";
1150 }
1151
1152 leaf admin_state {
1153 type AdminState;
1154
1155 description
1156 "";
1157 }
1158
1159 leaf oper_status {
1160 type OperStatus;
1161
1162 description
1163 "";
1164 }
1165
1166 leaf reason {
1167 type string;
1168 description
1169 "Used in FAILED state";
1170 }
1171
1172 leaf connect_status {
1173 type ConnectStatus;
1174
1175 description
1176 "";
1177 }
1178
1179 container custom {
1180 uses Any;
1181
1182 description
1183 "Device type specific attributes
1184TODO additional common attribute here";
1185 }
1186
1187 list ports {
1188 key "port_no";
1189 uses Port;
1190
1191 description
1192 "";
1193 }
1194
1195 container flows {
1196 uses Flows;
1197
1198 description
1199 "";
1200 }
1201
1202 container flow_groups {
1203 uses FlowGroups;
1204
1205 description
1206 "";
1207 }
1208
1209 container pm_configs {
1210 uses PmConfigs;
1211
1212 description
1213 "PmConfigs will eventually converted to a child node of the
1214 device to falicitata callbacks and to simplify manipulation.";
1215 }
1216
1217
1218
1219 choice choice_0 {
1220 case mac_address {
1221 leaf mac_address {
1222 type string;
1223 description
1224 "Device contact MAC address (format: xx:xx:xx:xx:xx:xx )";
1225 }
1226 }
1227 case ipv4_address {
1228 leaf ipv4_address {
1229 type string;
1230 description
1231 "Device contact IPv4 address (format: a.b.c.d or can use hostname too)";
1232 }
1233 }
1234 case ipv6_address {
1235 leaf ipv6_address {
1236 type string;
1237 description
1238 "Device contact IPv6 address using the canonical string form
1239 ( xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx )";
1240 }
1241 }
1242 case host_and_port {
1243 leaf host_and_port {
1244 type string;
1245 description
1246 "";
1247 }
1248 }
1249 }
1250
1251
1252 }
1253
1254 grouping Devices {
1255 description
1256 "";
1257 list items {
1258 key "id";
1259 uses Device;
1260
1261 description
1262 "";
1263 }
1264
1265
1266
1267 }
1268
1269
1270 grouping Empty {
1271 description
1272 "A generic empty message that you can re-use to avoid defining duplicated
1273 empty messages in your APIs. A typical example is to use it as the request
1274 or the response type of an API method. For instance:
1275
1276 service Foo
1277 rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1278
1279
1280 The JSON representation for `Empty` is empty JSON object ` `.";
1281
1282
1283 }
1284
1285
1286 grouping HealthStatus {
1287 description
1288 "Encode health status of a Voltha instance";
1289 leaf state {
1290 type HealthState;
1291 description
1292 "Current state of health of this Voltha instance";
1293 }
1294
1295
1296
1297 typedef HealthState {
1298 type enumeration {
1299 enum HEALTHY {
1300 description "";
1301 }
1302 enum OVERLOADED {
1303 description "";
1304 }
1305 enum DYING {
1306 description "";
1307 }
1308 }
1309 description
1310 "Health states";
1311 }
1312
1313 }
1314
1315 grouping LogicalPort {
1316 description
1317 "";
1318 leaf id {
1319 type string;
1320 description
1321 "";
1322 }
1323
1324 container ofp_port {
1325 uses ofp_port;
1326
1327 description
1328 "";
1329 }
1330
1331 leaf device_id {
1332 type string;
1333 description
1334 "";
1335 }
1336
1337 leaf device_port_no {
1338 type uint32;
1339 description
1340 "";
1341 }
1342
1343 leaf root_port {
1344 type boolean;
1345 description
1346 "";
1347 }
1348
1349
1350
1351 }
1352
1353 grouping LogicalPorts {
1354 description
1355 "";
1356 list items {
1357 key "id";
1358 uses LogicalPort;
1359
1360 description
1361 "";
1362 }
1363
1364
1365
1366 }
1367
1368 grouping LogicalDevice {
1369 description
1370 "";
1371 leaf id {
1372 type string;
1373 description
1374 "unique id of logical device";
1375 }
1376
1377 leaf datapath_id {
1378 type uint64;
1379 description
1380 "unique datapath id for the logical device (used by the SDN controller)";
1381 }
1382
1383 container desc {
1384 uses ofp_desc;
1385
1386 description
1387 "device description";
1388 }
1389
1390 container switch_features {
1391 uses ofp_switch_features;
1392
1393 description
1394 "device features";
1395 }
1396
1397 leaf root_device_id {
1398 type string;
1399 description
1400 "name of the root device anchoring logical device";
1401 }
1402
1403 list ports {
1404 key "id";
1405 uses LogicalPort;
1406
1407 description
1408 "logical device ports";
1409 }
1410
1411 container flows {
1412 uses Flows;
1413
1414 description
1415 "flows configured on the logical device";
1416 }
1417
1418 container flow_groups {
1419 uses FlowGroups;
1420
1421 description
1422 "flow groups configured on the logical device";
1423 }
1424
1425
1426
1427 }
1428
1429 grouping LogicalDevices {
1430 description
1431 "";
1432 list items {
1433 key "id";
1434 uses LogicalDevice;
1435
1436 description
1437 "";
1438 }
1439
1440
1441
1442 }
1443
1444
1445 typedef Access {
1446 type enumeration {
1447 enum CONFIG {
1448 description "";
1449 }
1450 enum READ_ONLY {
1451 description "";
1452 }
1453 enum REAL_TIME {
1454 description "";
1455 }
1456 }
1457 description
1458 "";
1459 }
1460
1461 container ChildNode {
1462 description
1463 "";
1464 leaf key {
1465 type string;
1466 description
1467 "";
1468 }
1469
1470
1471
1472 }
1473
1474 typedef ofp_port_no {
1475 type enumeration {
1476 enum OFPP_INVALID {
1477 description "";
1478 }
1479 enum OFPP_MAX {
1480 description "";
1481 }
1482 enum OFPP_IN_PORT {
1483 description "";
1484 }
1485 enum OFPP_TABLE {
1486 description "";
1487 }
1488 enum OFPP_NORMAL {
1489 description "";
1490 }
1491 enum OFPP_FLOOD {
1492 description "";
1493 }
1494 enum OFPP_ALL {
1495 description "";
1496 }
1497 enum OFPP_CONTROLLER {
1498 description "";
1499 }
1500 enum OFPP_LOCAL {
1501 description "";
1502 }
1503 enum OFPP_ANY {
1504 description "";
1505 }
1506 }
1507 description
1508 "Port numbering. Ports are numbered starting from 1.Version number:
1509 OpenFlow versions released: 0x01 = 1.0 ; 0x02 = 1.1 ; 0x03 = 1.2
1510 0x04 = 1.3
1511The most significant bit in the version field is reserved and must
1512 be set to zero.
1513#define OFP_VERSION 0x04
1514#define PIPELINE_TABLES 64
1515#define OFP_MAX_TABLE_NAME_LEN 32
1516#define OFP_MAX_PORT_NAME_LEN 16
1517Official IANA registered port for OpenFlow.#define OFP_TCP_PORT 6653
1518#define OFP_SSL_PORT 6653
1519#define OFP_ETH_ALEN 6 Bytes in an Ethernet address. ";
1520 }
1521 typedef ofp_type {
1522 type enumeration {
1523 enum OFPT_HELLO {
1524 description "";
1525 }
1526 enum OFPT_ERROR {
1527 description "";
1528 }
1529 enum OFPT_ECHO_REQUEST {
1530 description "";
1531 }
1532 enum OFPT_ECHO_REPLY {
1533 description "";
1534 }
1535 enum OFPT_EXPERIMENTER {
1536 description "";
1537 }
1538 enum OFPT_FEATURES_REQUEST {
1539 description "";
1540 }
1541 enum OFPT_FEATURES_REPLY {
1542 description "";
1543 }
1544 enum OFPT_GET_CONFIG_REQUEST {
1545 description "";
1546 }
1547 enum OFPT_GET_CONFIG_REPLY {
1548 description "";
1549 }
1550 enum OFPT_SET_CONFIG {
1551 description "";
1552 }
1553 enum OFPT_PACKET_IN {
1554 description "";
1555 }
1556 enum OFPT_FLOW_REMOVED {
1557 description "";
1558 }
1559 enum OFPT_PORT_STATUS {
1560 description "";
1561 }
1562 enum OFPT_PACKET_OUT {
1563 description "";
1564 }
1565 enum OFPT_FLOW_MOD {
1566 description "";
1567 }
1568 enum OFPT_GROUP_MOD {
1569 description "";
1570 }
1571 enum OFPT_PORT_MOD {
1572 description "";
1573 }
1574 enum OFPT_TABLE_MOD {
1575 description "";
1576 }
1577 enum OFPT_MULTIPART_REQUEST {
1578 description "";
1579 }
1580 enum OFPT_MULTIPART_REPLY {
1581 description "";
1582 }
1583 enum OFPT_BARRIER_REQUEST {
1584 description "";
1585 }
1586 enum OFPT_BARRIER_REPLY {
1587 description "";
1588 }
1589 enum OFPT_QUEUE_GET_CONFIG_REQUEST {
1590 description "";
1591 }
1592 enum OFPT_QUEUE_GET_CONFIG_REPLY {
1593 description "";
1594 }
1595 enum OFPT_ROLE_REQUEST {
1596 description "";
1597 }
1598 enum OFPT_ROLE_REPLY {
1599 description "";
1600 }
1601 enum OFPT_GET_ASYNC_REQUEST {
1602 description "";
1603 }
1604 enum OFPT_GET_ASYNC_REPLY {
1605 description "";
1606 }
1607 enum OFPT_SET_ASYNC {
1608 description "";
1609 }
1610 enum OFPT_METER_MOD {
1611 description "";
1612 }
1613 }
1614 description
1615 "";
1616 }
1617 typedef ofp_hello_elem_type {
1618 type enumeration {
1619 enum OFPHET_INVALID {
1620 description "";
1621 }
1622 enum OFPHET_VERSIONBITMAP {
1623 description "";
1624 }
1625 }
1626 description
1627 "Hello elements types.";
1628 }
1629 typedef ofp_config_flags {
1630 type enumeration {
1631 enum OFPC_FRAG_NORMAL {
1632 description "";
1633 }
1634 enum OFPC_FRAG_DROP {
1635 description "";
1636 }
1637 enum OFPC_FRAG_REASM {
1638 description "";
1639 }
1640 enum OFPC_FRAG_MASK {
1641 description "";
1642 }
1643 }
1644 description
1645 "#define OFP_DEFAULT_MISS_SEND_LEN 128";
1646 }
1647 typedef ofp_table_config {
1648 type enumeration {
1649 enum OFPTC_INVALID {
1650 description "";
1651 }
1652 enum OFPTC_DEPRECATED_MASK {
1653 description "";
1654 }
1655 }
1656 description
1657 "Flags to configure the table. Reserved for future use.";
1658 }
1659 typedef ofp_table {
1660 type enumeration {
1661 enum OFPTT_INVALID {
1662 description "";
1663 }
1664 enum OFPTT_MAX {
1665 description "";
1666 }
1667 enum OFPTT_ALL {
1668 description "";
1669 }
1670 }
1671 description
1672 "Table numbering. Tables can use any number up to OFPT_MAX.";
1673 }
1674 typedef ofp_capabilities {
1675 type enumeration {
1676 enum OFPC_INVALID {
1677 description "";
1678 }
1679 enum OFPC_FLOW_STATS {
1680 description "";
1681 }
1682 enum OFPC_TABLE_STATS {
1683 description "";
1684 }
1685 enum OFPC_PORT_STATS {
1686 description "";
1687 }
1688 enum OFPC_GROUP_STATS {
1689 description "";
1690 }
1691 enum OFPC_IP_REASM {
1692 description "";
1693 }
1694 enum OFPC_QUEUE_STATS {
1695 description "";
1696 }
1697 enum OFPC_PORT_BLOCKED {
1698 description "";
1699 }
1700 }
1701 description
1702 "Capabilities supported by the datapath.";
1703 }
1704 typedef ofp_port_config {
1705 type enumeration {
1706 enum OFPPC_INVALID {
1707 description "";
1708 }
1709 enum OFPPC_PORT_DOWN {
1710 description "";
1711 }
1712 enum OFPPC_NO_RECV {
1713 description "";
1714 }
1715 enum OFPPC_NO_FWD {
1716 description "";
1717 }
1718 enum OFPPC_NO_PACKET_IN {
1719 description "";
1720 }
1721 }
1722 description
1723 "Flags to indicate behavior of the physical port. These flags are
1724 used in ofp_port to describe the current configuration. They are
1725 used in the ofp_port_mod message to configure the port's behavior.";
1726 }
1727 typedef ofp_port_state {
1728 type enumeration {
1729 enum OFPPS_INVALID {
1730 description "";
1731 }
1732 enum OFPPS_LINK_DOWN {
1733 description "";
1734 }
1735 enum OFPPS_BLOCKED {
1736 description "";
1737 }
1738 enum OFPPS_LIVE {
1739 description "";
1740 }
1741 }
1742 description
1743 "Current state of the physical port. These are not configurable from
1744 the controller.";
1745 }
1746 typedef ofp_port_features {
1747 type enumeration {
1748 enum OFPPF_INVALID {
1749 description "";
1750 }
1751 enum OFPPF_10MB_HD {
1752 description "";
1753 }
1754 enum OFPPF_10MB_FD {
1755 description "";
1756 }
1757 enum OFPPF_100MB_HD {
1758 description "";
1759 }
1760 enum OFPPF_100MB_FD {
1761 description "";
1762 }
1763 enum OFPPF_1GB_HD {
1764 description "";
1765 }
1766 enum OFPPF_1GB_FD {
1767 description "";
1768 }
1769 enum OFPPF_10GB_FD {
1770 description "";
1771 }
1772 enum OFPPF_40GB_FD {
1773 description "";
1774 }
1775 enum OFPPF_100GB_FD {
1776 description "";
1777 }
1778 enum OFPPF_1TB_FD {
1779 description "";
1780 }
1781 enum OFPPF_OTHER {
1782 description "";
1783 }
1784 enum OFPPF_COPPER {
1785 description "";
1786 }
1787 enum OFPPF_FIBER {
1788 description "";
1789 }
1790 enum OFPPF_AUTONEG {
1791 description "";
1792 }
1793 enum OFPPF_PAUSE {
1794 description "";
1795 }
1796 enum OFPPF_PAUSE_ASYM {
1797 description "";
1798 }
1799 }
1800 description
1801 "Features of ports available in a datapath.";
1802 }
1803 typedef ofp_port_reason {
1804 type enumeration {
1805 enum OFPPR_ADD {
1806 description "";
1807 }
1808 enum OFPPR_DELETE {
1809 description "";
1810 }
1811 enum OFPPR_MODIFY {
1812 description "";
1813 }
1814 }
1815 description
1816 "What changed about the physical port";
1817 }
1818 typedef ofp_match_type {
1819 type enumeration {
1820 enum OFPMT_STANDARD {
1821 description "";
1822 }
1823 enum OFPMT_OXM {
1824 description "";
1825 }
1826 }
1827 description
1828 "The match type indicates the match structure (set of fields that compose the
1829 match) in use. The match type is placed in the type field at the beginning
1830 of all match structures. The OpenFlow Extensible Match type corresponds
1831 to OXM TLV format described below and must be supported by all OpenFlow
1832 switches. Extensions that define other match types may be published on the
1833 ONF wiki. Support for extensions is optional.
1834## -------------------------- #### OpenFlow Extensible Match. #### -------------------------- ##";
1835 }
1836 typedef ofp_oxm_class {
1837 type enumeration {
1838 enum OFPXMC_NXM_0 {
1839 description "";
1840 }
1841 enum OFPXMC_NXM_1 {
1842 description "";
1843 }
1844 enum OFPXMC_OPENFLOW_BASIC {
1845 description "";
1846 }
1847 enum OFPXMC_EXPERIMENTER {
1848 description "";
1849 }
1850 }
1851 description
1852 "OXM Class IDs.
1853 The high order bit differentiate reserved classes from member classes.
1854 Classes 0x0000 to 0x7FFF are member classes, allocated by ONF.
1855 Classes 0x8000 to 0xFFFE are reserved classes, reserved for standardisation.
1856Components of a OXM TLV header.
1857 Those macros are not valid for the experimenter class, macros for the
1858 experimenter class will depend on the experimenter header used.#define OXM_HEADER__(CLASS, FIELD, HASMASK, LENGTH)
1859 (((CLASS) 16) | ((FIELD) 9) | ((HASMASK) 8) | (LENGTH))
1860#define OXM_HEADER(CLASS, FIELD, LENGTH)
1861 OXM_HEADER__(CLASS, FIELD, 0, LENGTH)
1862#define OXM_HEADER_W(CLASS, FIELD, LENGTH)
1863 OXM_HEADER__(CLASS, FIELD, 1, (LENGTH) 2)
1864#define OXM_CLASS(HEADER) ((HEADER) 16)
1865#define OXM_FIELD(HEADER) (((HEADER) 9) & 0x7f)
1866#define OXM_TYPE(HEADER) (((HEADER) 9) & 0x7fffff)
1867#define OXM_HASMASK(HEADER) (((HEADER) 8) & 1)
1868#define OXM_LENGTH(HEADER) ((HEADER) & 0xff)
1869
1870#define OXM_MAKE_WILD_HEADER(HEADER)
1871 OXM_HEADER_W(OXM_CLASS(HEADER), OXM_FIELD(HEADER), OXM_LENGTH(HEADER))";
1872 }
1873 typedef oxm_ofb_field_types {
1874 type enumeration {
1875 enum OFPXMT_OFB_IN_PORT {
1876 description "";
1877 }
1878 enum OFPXMT_OFB_IN_PHY_PORT {
1879 description "";
1880 }
1881 enum OFPXMT_OFB_METADATA {
1882 description "";
1883 }
1884 enum OFPXMT_OFB_ETH_DST {
1885 description "";
1886 }
1887 enum OFPXMT_OFB_ETH_SRC {
1888 description "";
1889 }
1890 enum OFPXMT_OFB_ETH_TYPE {
1891 description "";
1892 }
1893 enum OFPXMT_OFB_VLAN_VID {
1894 description "";
1895 }
1896 enum OFPXMT_OFB_VLAN_PCP {
1897 description "";
1898 }
1899 enum OFPXMT_OFB_IP_DSCP {
1900 description "";
1901 }
1902 enum OFPXMT_OFB_IP_ECN {
1903 description "";
1904 }
1905 enum OFPXMT_OFB_IP_PROTO {
1906 description "";
1907 }
1908 enum OFPXMT_OFB_IPV4_SRC {
1909 description "";
1910 }
1911 enum OFPXMT_OFB_IPV4_DST {
1912 description "";
1913 }
1914 enum OFPXMT_OFB_TCP_SRC {
1915 description "";
1916 }
1917 enum OFPXMT_OFB_TCP_DST {
1918 description "";
1919 }
1920 enum OFPXMT_OFB_UDP_SRC {
1921 description "";
1922 }
1923 enum OFPXMT_OFB_UDP_DST {
1924 description "";
1925 }
1926 enum OFPXMT_OFB_SCTP_SRC {
1927 description "";
1928 }
1929 enum OFPXMT_OFB_SCTP_DST {
1930 description "";
1931 }
1932 enum OFPXMT_OFB_ICMPV4_TYPE {
1933 description "";
1934 }
1935 enum OFPXMT_OFB_ICMPV4_CODE {
1936 description "";
1937 }
1938 enum OFPXMT_OFB_ARP_OP {
1939 description "";
1940 }
1941 enum OFPXMT_OFB_ARP_SPA {
1942 description "";
1943 }
1944 enum OFPXMT_OFB_ARP_TPA {
1945 description "";
1946 }
1947 enum OFPXMT_OFB_ARP_SHA {
1948 description "";
1949 }
1950 enum OFPXMT_OFB_ARP_THA {
1951 description "";
1952 }
1953 enum OFPXMT_OFB_IPV6_SRC {
1954 description "";
1955 }
1956 enum OFPXMT_OFB_IPV6_DST {
1957 description "";
1958 }
1959 enum OFPXMT_OFB_IPV6_FLABEL {
1960 description "";
1961 }
1962 enum OFPXMT_OFB_ICMPV6_TYPE {
1963 description "";
1964 }
1965 enum OFPXMT_OFB_ICMPV6_CODE {
1966 description "";
1967 }
1968 enum OFPXMT_OFB_IPV6_ND_TARGET {
1969 description "";
1970 }
1971 enum OFPXMT_OFB_IPV6_ND_SLL {
1972 description "";
1973 }
1974 enum OFPXMT_OFB_IPV6_ND_TLL {
1975 description "";
1976 }
1977 enum OFPXMT_OFB_MPLS_LABEL {
1978 description "";
1979 }
1980 enum OFPXMT_OFB_MPLS_TC {
1981 description "";
1982 }
1983 enum OFPXMT_OFB_MPLS_BOS {
1984 description "";
1985 }
1986 enum OFPXMT_OFB_PBB_ISID {
1987 description "";
1988 }
1989 enum OFPXMT_OFB_TUNNEL_ID {
1990 description "";
1991 }
1992 enum OFPXMT_OFB_IPV6_EXTHDR {
1993 description "";
1994 }
1995 }
1996 description
1997 "OXM Flow field types for OpenFlow basic class.";
1998 }
1999 typedef ofp_vlan_id {
2000 type enumeration {
2001 enum OFPVID_NONE {
2002 description "";
2003 }
2004 enum OFPVID_PRESENT {
2005 description "";
2006 }
2007 }
2008 description
2009 "The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
2010 special conditions.";
2011 }
2012 typedef ofp_ipv6exthdr_flags {
2013 type enumeration {
2014 enum OFPIEH_INVALID {
2015 description "";
2016 }
2017 enum OFPIEH_NONEXT {
2018 description "";
2019 }
2020 enum OFPIEH_ESP {
2021 description "";
2022 }
2023 enum OFPIEH_AUTH {
2024 description "";
2025 }
2026 enum OFPIEH_DEST {
2027 description "";
2028 }
2029 enum OFPIEH_FRAG {
2030 description "";
2031 }
2032 enum OFPIEH_ROUTER {
2033 description "";
2034 }
2035 enum OFPIEH_HOP {
2036 description "";
2037 }
2038 enum OFPIEH_UNREP {
2039 description "";
2040 }
2041 enum OFPIEH_UNSEQ {
2042 description "";
2043 }
2044 }
2045 description
2046 "Bit definitions for IPv6 Extension Header pseudo-field.#define OFP_VLAN_NONE OFPVID_NONE";
2047 }
2048 typedef ofp_action_type {
2049 type enumeration {
2050 enum OFPAT_OUTPUT {
2051 description "";
2052 }
2053 enum OFPAT_COPY_TTL_OUT {
2054 description "";
2055 }
2056 enum OFPAT_COPY_TTL_IN {
2057 description "";
2058 }
2059 enum OFPAT_SET_MPLS_TTL {
2060 description "";
2061 }
2062 enum OFPAT_DEC_MPLS_TTL {
2063 description "";
2064 }
2065 enum OFPAT_PUSH_VLAN {
2066 description "";
2067 }
2068 enum OFPAT_POP_VLAN {
2069 description "";
2070 }
2071 enum OFPAT_PUSH_MPLS {
2072 description "";
2073 }
2074 enum OFPAT_POP_MPLS {
2075 description "";
2076 }
2077 enum OFPAT_SET_QUEUE {
2078 description "";
2079 }
2080 enum OFPAT_GROUP {
2081 description "";
2082 }
2083 enum OFPAT_SET_NW_TTL {
2084 description "";
2085 }
2086 enum OFPAT_DEC_NW_TTL {
2087 description "";
2088 }
2089 enum OFPAT_SET_FIELD {
2090 description "";
2091 }
2092 enum OFPAT_PUSH_PBB {
2093 description "";
2094 }
2095 enum OFPAT_POP_PBB {
2096 description "";
2097 }
2098 enum OFPAT_EXPERIMENTER {
2099 description "";
2100 }
2101 }
2102 description
2103 "## ----------------- #### OpenFlow Actions. #### ----------------- ##";
2104 }
2105 typedef ofp_controller_max_len {
2106 type enumeration {
2107 enum OFPCML_INVALID {
2108 description "";
2109 }
2110 enum OFPCML_MAX {
2111 description "";
2112 }
2113 enum OFPCML_NO_BUFFER {
2114 description "";
2115 }
2116 }
2117 description
2118 "";
2119 }
2120 typedef ofp_instruction_type {
2121 type enumeration {
2122 enum OFPIT_INVALID {
2123 description "";
2124 }
2125 enum OFPIT_GOTO_TABLE {
2126 description "";
2127 }
2128 enum OFPIT_WRITE_METADATA {
2129 description "";
2130 }
2131 enum OFPIT_WRITE_ACTIONS {
2132 description "";
2133 }
2134 enum OFPIT_APPLY_ACTIONS {
2135 description "";
2136 }
2137 enum OFPIT_CLEAR_ACTIONS {
2138 description "";
2139 }
2140 enum OFPIT_METER {
2141 description "";
2142 }
2143 enum OFPIT_EXPERIMENTER {
2144 description "";
2145 }
2146 }
2147 description
2148 "## ---------------------- #### OpenFlow Instructions. #### ---------------------- ##";
2149 }
2150 typedef ofp_flow_mod_command {
2151 type enumeration {
2152 enum OFPFC_ADD {
2153 description "";
2154 }
2155 enum OFPFC_MODIFY {
2156 description "";
2157 }
2158 enum OFPFC_MODIFY_STRICT {
2159 description "";
2160 }
2161 enum OFPFC_DELETE {
2162 description "";
2163 }
2164 enum OFPFC_DELETE_STRICT {
2165 description "";
2166 }
2167 }
2168 description
2169 "## --------------------------- #### OpenFlow Flow Modification. #### --------------------------- ##";
2170 }
2171 typedef ofp_flow_mod_flags {
2172 type enumeration {
2173 enum OFPFF_INVALID {
2174 description "";
2175 }
2176 enum OFPFF_SEND_FLOW_REM {
2177 description "";
2178 }
2179 enum OFPFF_CHECK_OVERLAP {
2180 description "";
2181 }
2182 enum OFPFF_RESET_COUNTS {
2183 description "";
2184 }
2185 enum OFPFF_NO_PKT_COUNTS {
2186 description "";
2187 }
2188 enum OFPFF_NO_BYT_COUNTS {
2189 description "";
2190 }
2191 }
2192 description
2193 "Value used in idle_timeout and hard_timeout to indicate that the entry
2194 is permanent.#define OFP_FLOW_PERMANENT 0
2195By default, choose a priority in the middle.#define OFP_DEFAULT_PRIORITY 0x8000";
2196 }
2197 typedef ofp_group {
2198 type enumeration {
2199 enum OFPG_INVALID {
2200 description "";
2201 }
2202 enum OFPG_MAX {
2203 description "";
2204 }
2205 enum OFPG_ALL {
2206 description "";
2207 }
2208 enum OFPG_ANY {
2209 description "";
2210 }
2211 }
2212 description
2213 "Group numbering. Groups can use any number up to OFPG_MAX.";
2214 }
2215 typedef ofp_group_mod_command {
2216 type enumeration {
2217 enum OFPGC_ADD {
2218 description "";
2219 }
2220 enum OFPGC_MODIFY {
2221 description "";
2222 }
2223 enum OFPGC_DELETE {
2224 description "";
2225 }
2226 }
2227 description
2228 "Group commands";
2229 }
2230 typedef ofp_group_type {
2231 type enumeration {
2232 enum OFPGT_ALL {
2233 description "";
2234 }
2235 enum OFPGT_SELECT {
2236 description "";
2237 }
2238 enum OFPGT_INDIRECT {
2239 description "";
2240 }
2241 enum OFPGT_FF {
2242 description "";
2243 }
2244 }
2245 description
2246 "Group types. Values in the range 128; 255 are reserved for experimental
2247 use.";
2248 }
2249 typedef ofp_packet_in_reason {
2250 type enumeration {
2251 enum OFPR_NO_MATCH {
2252 description "";
2253 }
2254 enum OFPR_ACTION {
2255 description "";
2256 }
2257 enum OFPR_INVALID_TTL {
2258 description "";
2259 }
2260 }
2261 description
2262 "Why is this packet being sent to the controller?";
2263 }
2264 typedef ofp_flow_removed_reason {
2265 type enumeration {
2266 enum OFPRR_IDLE_TIMEOUT {
2267 description "";
2268 }
2269 enum OFPRR_HARD_TIMEOUT {
2270 description "";
2271 }
2272 enum OFPRR_DELETE {
2273 description "";
2274 }
2275 enum OFPRR_GROUP_DELETE {
2276 description "";
2277 }
2278 enum OFPRR_METER_DELETE {
2279 description "";
2280 }
2281 }
2282 description
2283 "Why was this flow removed?";
2284 }
2285 typedef ofp_meter {
2286 type enumeration {
2287 enum OFPM_ZERO {
2288 description "";
2289 }
2290 enum OFPM_MAX {
2291 description "";
2292 }
2293 enum OFPM_SLOWPATH {
2294 description "";
2295 }
2296 enum OFPM_CONTROLLER {
2297 description "";
2298 }
2299 enum OFPM_ALL {
2300 description "";
2301 }
2302 }
2303 description
2304 "Meter numbering. Flow meters can use any number up to OFPM_MAX.";
2305 }
2306 typedef ofp_meter_band_type {
2307 type enumeration {
2308 enum OFPMBT_INVALID {
2309 description "";
2310 }
2311 enum OFPMBT_DROP {
2312 description "";
2313 }
2314 enum OFPMBT_DSCP_REMARK {
2315 description "";
2316 }
2317 enum OFPMBT_EXPERIMENTER {
2318 description "";
2319 }
2320 }
2321 description
2322 "Meter band types";
2323 }
2324 typedef ofp_meter_mod_command {
2325 type enumeration {
2326 enum OFPMC_ADD {
2327 description "";
2328 }
2329 enum OFPMC_MODIFY {
2330 description "";
2331 }
2332 enum OFPMC_DELETE {
2333 description "";
2334 }
2335 }
2336 description
2337 "Meter commands";
2338 }
2339 typedef ofp_meter_flags {
2340 type enumeration {
2341 enum OFPMF_INVALID {
2342 description "";
2343 }
2344 enum OFPMF_KBPS {
2345 description "";
2346 }
2347 enum OFPMF_PKTPS {
2348 description "";
2349 }
2350 enum OFPMF_BURST {
2351 description "";
2352 }
2353 enum OFPMF_STATS {
2354 description "";
2355 }
2356 }
2357 description
2358 "Meter configuration flags";
2359 }
2360 typedef ofp_error_type {
2361 type enumeration {
2362 enum OFPET_HELLO_FAILED {
2363 description "";
2364 }
2365 enum OFPET_BAD_REQUEST {
2366 description "";
2367 }
2368 enum OFPET_BAD_ACTION {
2369 description "";
2370 }
2371 enum OFPET_BAD_INSTRUCTION {
2372 description "";
2373 }
2374 enum OFPET_BAD_MATCH {
2375 description "";
2376 }
2377 enum OFPET_FLOW_MOD_FAILED {
2378 description "";
2379 }
2380 enum OFPET_GROUP_MOD_FAILED {
2381 description "";
2382 }
2383 enum OFPET_PORT_MOD_FAILED {
2384 description "";
2385 }
2386 enum OFPET_TABLE_MOD_FAILED {
2387 description "";
2388 }
2389 enum OFPET_QUEUE_OP_FAILED {
2390 description "";
2391 }
2392 enum OFPET_SWITCH_CONFIG_FAILED {
2393 description "";
2394 }
2395 enum OFPET_ROLE_REQUEST_FAILED {
2396 description "";
2397 }
2398 enum OFPET_METER_MOD_FAILED {
2399 description "";
2400 }
2401 enum OFPET_TABLE_FEATURES_FAILED {
2402 description "";
2403 }
2404 enum OFPET_EXPERIMENTER {
2405 description "";
2406 }
2407 }
2408 description
2409 "Values for 'type' in ofp_error_message. These values are immutable: they
2410 will not change in future versions of the protocol (although new values may
2411 be added).";
2412 }
2413 typedef ofp_hello_failed_code {
2414 type enumeration {
2415 enum OFPHFC_INCOMPATIBLE {
2416 description "";
2417 }
2418 enum OFPHFC_EPERM {
2419 description "";
2420 }
2421 }
2422 description
2423 "ofp_error_msg 'code' values for OFPET_HELLO_FAILED. 'data' contains an
2424 ASCII text string that may give failure details.";
2425 }
2426 typedef ofp_bad_request_code {
2427 type enumeration {
2428 enum OFPBRC_BAD_VERSION {
2429 description "";
2430 }
2431 enum OFPBRC_BAD_TYPE {
2432 description "";
2433 }
2434 enum OFPBRC_BAD_MULTIPART {
2435 description "";
2436 }
2437 enum OFPBRC_BAD_EXPERIMENTER {
2438 description "";
2439 }
2440 enum OFPBRC_BAD_EXP_TYPE {
2441 description "";
2442 }
2443 enum OFPBRC_EPERM {
2444 description "";
2445 }
2446 enum OFPBRC_BAD_LEN {
2447 description "";
2448 }
2449 enum OFPBRC_BUFFER_EMPTY {
2450 description "";
2451 }
2452 enum OFPBRC_BUFFER_UNKNOWN {
2453 description "";
2454 }
2455 enum OFPBRC_BAD_TABLE_ID {
2456 description "";
2457 }
2458 enum OFPBRC_IS_SLAVE {
2459 description "";
2460 }
2461 enum OFPBRC_BAD_PORT {
2462 description "";
2463 }
2464 enum OFPBRC_BAD_PACKET {
2465 description "";
2466 }
2467 enum OFPBRC_MULTIPART_BUFFER_OVERFLOW {
2468 description "";
2469 }
2470 }
2471 description
2472 "ofp_error_msg 'code' values for OFPET_BAD_REQUEST. 'data' contains at least
2473 the first 64 bytes of the failed request.";
2474 }
2475 typedef ofp_bad_action_code {
2476 type enumeration {
2477 enum OFPBAC_BAD_TYPE {
2478 description "";
2479 }
2480 enum OFPBAC_BAD_LEN {
2481 description "";
2482 }
2483 enum OFPBAC_BAD_EXPERIMENTER {
2484 description "";
2485 }
2486 enum OFPBAC_BAD_EXP_TYPE {
2487 description "";
2488 }
2489 enum OFPBAC_BAD_OUT_PORT {
2490 description "";
2491 }
2492 enum OFPBAC_BAD_ARGUMENT {
2493 description "";
2494 }
2495 enum OFPBAC_EPERM {
2496 description "";
2497 }
2498 enum OFPBAC_TOO_MANY {
2499 description "";
2500 }
2501 enum OFPBAC_BAD_QUEUE {
2502 description "";
2503 }
2504 enum OFPBAC_BAD_OUT_GROUP {
2505 description "";
2506 }
2507 enum OFPBAC_MATCH_INCONSISTENT {
2508 description "";
2509 }
2510 enum OFPBAC_UNSUPPORTED_ORDER {
2511 description "";
2512 }
2513 enum OFPBAC_BAD_TAG {
2514 description "";
2515 }
2516 enum OFPBAC_BAD_SET_TYPE {
2517 description "";
2518 }
2519 enum OFPBAC_BAD_SET_LEN {
2520 description "";
2521 }
2522 enum OFPBAC_BAD_SET_ARGUMENT {
2523 description "";
2524 }
2525 }
2526 description
2527 "ofp_error_msg 'code' values for OFPET_BAD_ACTION. 'data' contains at least
2528 the first 64 bytes of the failed request.";
2529 }
2530 typedef ofp_bad_instruction_code {
2531 type enumeration {
2532 enum OFPBIC_UNKNOWN_INST {
2533 description "";
2534 }
2535 enum OFPBIC_UNSUP_INST {
2536 description "";
2537 }
2538 enum OFPBIC_BAD_TABLE_ID {
2539 description "";
2540 }
2541 enum OFPBIC_UNSUP_METADATA {
2542 description "";
2543 }
2544 enum OFPBIC_UNSUP_METADATA_MASK {
2545 description "";
2546 }
2547 enum OFPBIC_BAD_EXPERIMENTER {
2548 description "";
2549 }
2550 enum OFPBIC_BAD_EXP_TYPE {
2551 description "";
2552 }
2553 enum OFPBIC_BAD_LEN {
2554 description "";
2555 }
2556 enum OFPBIC_EPERM {
2557 description "";
2558 }
2559 }
2560 description
2561 "ofp_error_msg 'code' values for OFPET_BAD_INSTRUCTION. 'data' contains at
2562 least the first 64 bytes of the failed request.";
2563 }
2564 typedef ofp_bad_match_code {
2565 type enumeration {
2566 enum OFPBMC_BAD_TYPE {
2567 description "";
2568 }
2569 enum OFPBMC_BAD_LEN {
2570 description "";
2571 }
2572 enum OFPBMC_BAD_TAG {
2573 description "";
2574 }
2575 enum OFPBMC_BAD_DL_ADDR_MASK {
2576 description "";
2577 }
2578 enum OFPBMC_BAD_NW_ADDR_MASK {
2579 description "";
2580 }
2581 enum OFPBMC_BAD_WILDCARDS {
2582 description "";
2583 }
2584 enum OFPBMC_BAD_FIELD {
2585 description "";
2586 }
2587 enum OFPBMC_BAD_VALUE {
2588 description "";
2589 }
2590 enum OFPBMC_BAD_MASK {
2591 description "";
2592 }
2593 enum OFPBMC_BAD_PREREQ {
2594 description "";
2595 }
2596 enum OFPBMC_DUP_FIELD {
2597 description "";
2598 }
2599 enum OFPBMC_EPERM {
2600 description "";
2601 }
2602 }
2603 description
2604 "ofp_error_msg 'code' values for OFPET_BAD_MATCH. 'data' contains at least
2605 the first 64 bytes of the failed request.";
2606 }
2607 typedef ofp_flow_mod_failed_code {
2608 type enumeration {
2609 enum OFPFMFC_UNKNOWN {
2610 description "";
2611 }
2612 enum OFPFMFC_TABLE_FULL {
2613 description "";
2614 }
2615 enum OFPFMFC_BAD_TABLE_ID {
2616 description "";
2617 }
2618 enum OFPFMFC_OVERLAP {
2619 description "";
2620 }
2621 enum OFPFMFC_EPERM {
2622 description "";
2623 }
2624 enum OFPFMFC_BAD_TIMEOUT {
2625 description "";
2626 }
2627 enum OFPFMFC_BAD_COMMAND {
2628 description "";
2629 }
2630 enum OFPFMFC_BAD_FLAGS {
2631 description "";
2632 }
2633 }
2634 description
2635 "ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED. 'data' contains
2636 at least the first 64 bytes of the failed request.";
2637 }
2638 typedef ofp_group_mod_failed_code {
2639 type enumeration {
2640 enum OFPGMFC_GROUP_EXISTS {
2641 description "";
2642 }
2643 enum OFPGMFC_INVALID_GROUP {
2644 description "";
2645 }
2646 enum OFPGMFC_WEIGHT_UNSUPPORTED {
2647 description "";
2648 }
2649 enum OFPGMFC_OUT_OF_GROUPS {
2650 description "";
2651 }
2652 enum OFPGMFC_OUT_OF_BUCKETS {
2653 description "";
2654 }
2655 enum OFPGMFC_CHAINING_UNSUPPORTED {
2656 description "";
2657 }
2658 enum OFPGMFC_WATCH_UNSUPPORTED {
2659 description "";
2660 }
2661 enum OFPGMFC_LOOP {
2662 description "";
2663 }
2664 enum OFPGMFC_UNKNOWN_GROUP {
2665 description "";
2666 }
2667 enum OFPGMFC_CHAINED_GROUP {
2668 description "";
2669 }
2670 enum OFPGMFC_BAD_TYPE {
2671 description "";
2672 }
2673 enum OFPGMFC_BAD_COMMAND {
2674 description "";
2675 }
2676 enum OFPGMFC_BAD_BUCKET {
2677 description "";
2678 }
2679 enum OFPGMFC_BAD_WATCH {
2680 description "";
2681 }
2682 enum OFPGMFC_EPERM {
2683 description "";
2684 }
2685 }
2686 description
2687 "ofp_error_msg 'code' values for OFPET_GROUP_MOD_FAILED. 'data' contains
2688 at least the first 64 bytes of the failed request.";
2689 }
2690 typedef ofp_port_mod_failed_code {
2691 type enumeration {
2692 enum OFPPMFC_BAD_PORT {
2693 description "";
2694 }
2695 enum OFPPMFC_BAD_HW_ADDR {
2696 description "";
2697 }
2698 enum OFPPMFC_BAD_CONFIG {
2699 description "";
2700 }
2701 enum OFPPMFC_BAD_ADVERTISE {
2702 description "";
2703 }
2704 enum OFPPMFC_EPERM {
2705 description "";
2706 }
2707 }
2708 description
2709 "ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED. 'data' contains
2710 at least the first 64 bytes of the failed request.";
2711 }
2712 typedef ofp_table_mod_failed_code {
2713 type enumeration {
2714 enum OFPTMFC_BAD_TABLE {
2715 description "";
2716 }
2717 enum OFPTMFC_BAD_CONFIG {
2718 description "";
2719 }
2720 enum OFPTMFC_EPERM {
2721 description "";
2722 }
2723 }
2724 description
2725 "ofp_error_msg 'code' values for OFPET_TABLE_MOD_FAILED. 'data' contains
2726 at least the first 64 bytes of the failed request.";
2727 }
2728 typedef ofp_queue_op_failed_code {
2729 type enumeration {
2730 enum OFPQOFC_BAD_PORT {
2731 description "";
2732 }
2733 enum OFPQOFC_BAD_QUEUE {
2734 description "";
2735 }
2736 enum OFPQOFC_EPERM {
2737 description "";
2738 }
2739 }
2740 description
2741 "ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
2742 at least the first 64 bytes of the failed request";
2743 }
2744 typedef ofp_switch_config_failed_code {
2745 type enumeration {
2746 enum OFPSCFC_BAD_FLAGS {
2747 description "";
2748 }
2749 enum OFPSCFC_BAD_LEN {
2750 description "";
2751 }
2752 enum OFPSCFC_EPERM {
2753 description "";
2754 }
2755 }
2756 description
2757 "ofp_error_msg 'code' values for OFPET_SWITCH_CONFIG_FAILED. 'data' contains
2758 at least the first 64 bytes of the failed request.";
2759 }
2760 typedef ofp_role_request_failed_code {
2761 type enumeration {
2762 enum OFPRRFC_STALE {
2763 description "";
2764 }
2765 enum OFPRRFC_UNSUP {
2766 description "";
2767 }
2768 enum OFPRRFC_BAD_ROLE {
2769 description "";
2770 }
2771 }
2772 description
2773 "ofp_error_msg 'code' values for OFPET_ROLE_REQUEST_FAILED. 'data' contains
2774 at least the first 64 bytes of the failed request.";
2775 }
2776 typedef ofp_meter_mod_failed_code {
2777 type enumeration {
2778 enum OFPMMFC_UNKNOWN {
2779 description "";
2780 }
2781 enum OFPMMFC_METER_EXISTS {
2782 description "";
2783 }
2784 enum OFPMMFC_INVALID_METER {
2785 description "";
2786 }
2787 enum OFPMMFC_UNKNOWN_METER {
2788 description "";
2789 }
2790 enum OFPMMFC_BAD_COMMAND {
2791 description "";
2792 }
2793 enum OFPMMFC_BAD_FLAGS {
2794 description "";
2795 }
2796 enum OFPMMFC_BAD_RATE {
2797 description "";
2798 }
2799 enum OFPMMFC_BAD_BURST {
2800 description "";
2801 }
2802 enum OFPMMFC_BAD_BAND {
2803 description "";
2804 }
2805 enum OFPMMFC_BAD_BAND_VALUE {
2806 description "";
2807 }
2808 enum OFPMMFC_OUT_OF_METERS {
2809 description "";
2810 }
2811 enum OFPMMFC_OUT_OF_BANDS {
2812 description "";
2813 }
2814 }
2815 description
2816 "ofp_error_msg 'code' values for OFPET_METER_MOD_FAILED. 'data' contains
2817 at least the first 64 bytes of the failed request.";
2818 }
2819 typedef ofp_table_features_failed_code {
2820 type enumeration {
2821 enum OFPTFFC_BAD_TABLE {
2822 description "";
2823 }
2824 enum OFPTFFC_BAD_METADATA {
2825 description "";
2826 }
2827 enum OFPTFFC_BAD_TYPE {
2828 description "";
2829 }
2830 enum OFPTFFC_BAD_LEN {
2831 description "";
2832 }
2833 enum OFPTFFC_BAD_ARGUMENT {
2834 description "";
2835 }
2836 enum OFPTFFC_EPERM {
2837 description "";
2838 }
2839 }
2840 description
2841 "ofp_error_msg 'code' values for OFPET_TABLE_FEATURES_FAILED. 'data' contains
2842 at least the first 64 bytes of the failed request.";
2843 }
2844 typedef ofp_multipart_type {
2845 type enumeration {
2846 enum OFPMP_DESC {
2847 description "";
2848 }
2849 enum OFPMP_FLOW {
2850 description "";
2851 }
2852 enum OFPMP_AGGREGATE {
2853 description "";
2854 }
2855 enum OFPMP_TABLE {
2856 description "";
2857 }
2858 enum OFPMP_PORT_STATS {
2859 description "";
2860 }
2861 enum OFPMP_QUEUE {
2862 description "";
2863 }
2864 enum OFPMP_GROUP {
2865 description "";
2866 }
2867 enum OFPMP_GROUP_DESC {
2868 description "";
2869 }
2870 enum OFPMP_GROUP_FEATURES {
2871 description "";
2872 }
2873 enum OFPMP_METER {
2874 description "";
2875 }
2876 enum OFPMP_METER_CONFIG {
2877 description "";
2878 }
2879 enum OFPMP_METER_FEATURES {
2880 description "";
2881 }
2882 enum OFPMP_TABLE_FEATURES {
2883 description "";
2884 }
2885 enum OFPMP_PORT_DESC {
2886 description "";
2887 }
2888 enum OFPMP_EXPERIMENTER {
2889 description "";
2890 }
2891 }
2892 description
2893 "";
2894 }
2895 typedef ofp_multipart_request_flags {
2896 type enumeration {
2897 enum OFPMPF_REQ_INVALID {
2898 description "";
2899 }
2900 enum OFPMPF_REQ_MORE {
2901 description "";
2902 }
2903 }
2904 description
2905 "Backward compatibility with 1.3.1 - avoid breaking the API.#define ofp_multipart_types ofp_multipart_type";
2906 }
2907 typedef ofp_multipart_reply_flags {
2908 type enumeration {
2909 enum OFPMPF_REPLY_INVALID {
2910 description "";
2911 }
2912 enum OFPMPF_REPLY_MORE {
2913 description "";
2914 }
2915 }
2916 description
2917 "";
2918 }
2919 typedef ofp_table_feature_prop_type {
2920 type enumeration {
2921 enum OFPTFPT_INSTRUCTIONS {
2922 description "";
2923 }
2924 enum OFPTFPT_INSTRUCTIONS_MISS {
2925 description "";
2926 }
2927 enum OFPTFPT_NEXT_TABLES {
2928 description "";
2929 }
2930 enum OFPTFPT_NEXT_TABLES_MISS {
2931 description "";
2932 }
2933 enum OFPTFPT_WRITE_ACTIONS {
2934 description "";
2935 }
2936 enum OFPTFPT_WRITE_ACTIONS_MISS {
2937 description "";
2938 }
2939 enum OFPTFPT_APPLY_ACTIONS {
2940 description "";
2941 }
2942 enum OFPTFPT_APPLY_ACTIONS_MISS {
2943 description "";
2944 }
2945 enum OFPTFPT_MATCH {
2946 description "";
2947 }
2948 enum OFPTFPT_WILDCARDS {
2949 description "";
2950 }
2951 enum OFPTFPT_WRITE_SETFIELD {
2952 description "";
2953 }
2954 enum OFPTFPT_WRITE_SETFIELD_MISS {
2955 description "";
2956 }
2957 enum OFPTFPT_APPLY_SETFIELD {
2958 description "";
2959 }
2960 enum OFPTFPT_APPLY_SETFIELD_MISS {
2961 description "";
2962 }
2963 enum OFPTFPT_EXPERIMENTER {
2964 description "";
2965 }
2966 enum OFPTFPT_EXPERIMENTER_MISS {
2967 description "";
2968 }
2969 }
2970 description
2971 "Table Feature property types.
2972 Low order bit cleared indicates a property for a regular Flow Entry.
2973 Low order bit set indicates a property for the Table-Miss Flow Entry.";
2974 }
2975 typedef ofp_group_capabilities {
2976 type enumeration {
2977 enum OFPGFC_INVALID {
2978 description "";
2979 }
2980 enum OFPGFC_SELECT_WEIGHT {
2981 description "";
2982 }
2983 enum OFPGFC_SELECT_LIVENESS {
2984 description "";
2985 }
2986 enum OFPGFC_CHAINING {
2987 description "";
2988 }
2989 enum OFPGFC_CHAINING_CHECKS {
2990 description "";
2991 }
2992 }
2993 description
2994 "Group configuration flagsBackward compatibility with 1.3.1 - avoid breaking the API.#define ofp_group_desc_stats ofp_group_desc";
2995 }
2996 typedef ofp_queue_properties {
2997 type enumeration {
2998 enum OFPQT_INVALID {
2999 description "";
3000 }
3001 enum OFPQT_MIN_RATE {
3002 description "";
3003 }
3004 enum OFPQT_MAX_RATE {
3005 description "";
3006 }
3007 enum OFPQT_EXPERIMENTER {
3008 description "";
3009 }
3010 }
3011 description
3012 "All ones is used to indicate all queues in a port (for stats retrieval).#define OFPQ_ALL 0xffffffff
3013Min rate 1000 means not configured.#define OFPQ_MIN_RATE_UNCFG 0xffff
3014Max rate 1000 means not configured.#define OFPQ_MAX_RATE_UNCFG 0xffff";
3015 }
3016 typedef ofp_controller_role {
3017 type enumeration {
3018 enum OFPCR_ROLE_NOCHANGE {
3019 description "";
3020 }
3021 enum OFPCR_ROLE_EQUAL {
3022 description "";
3023 }
3024 enum OFPCR_ROLE_MASTER {
3025 description "";
3026 }
3027 enum OFPCR_ROLE_SLAVE {
3028 description "";
3029 }
3030 }
3031 description
3032 "Controller roles.Configures the role of the sending controller. The default role is:
3033
3034 - Equal (OFPCR_ROLE_EQUAL), which allows the controller access to all
3035 OpenFlow features. All controllers have equal responsibility.
3036
3037 The other possible roles are a related pair:
3038
3039 - Master (OFPCR_ROLE_MASTER) is equivalent to Equal, except that there
3040 may be at most one Master controller at a time: when a controller
3041 configures itself as Master, any existing Master is demoted to the
3042 Slave role.
3043
3044 - Slave (OFPCR_ROLE_SLAVE) allows the controller read-only access to
3045 OpenFlow features. In particular attempts to modify the flow table
3046 will be rejected with an OFPBRC_EPERM error.
3047
3048 Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED
3049 messages, but they do receive OFPT_PORT_STATUS messages.";
3050 }
3051
3052 container ofp_header {
3053 description
3054 "Header on all OpenFlow packets.";
3055 leaf version {
3056 type uint32;
3057 description
3058 "OFP_VERSION.";
3059 }
3060
3061 leaf type {
3062 type ofp_type;
3063
3064 description
3065 "One of the OFPT_ constants.";
3066 }
3067
3068 leaf xid {
3069 type uint32;
3070 description
3071 "Transaction id associated with this packet.
3072Replies use the same id as was in the request
3073to facilitate pairing.";
3074 }
3075
3076
3077
3078 }
3079
3080 grouping ofp_hello_elem_header {
3081 description
3082 "Common header for all Hello Elements";
3083 leaf type {
3084 type ofp_hello_elem_type;
3085
3086 description
3087 "One of OFPHET_ .";
3088 }
3089
3090
3091
3092 choice choice_0 {
3093 case versionbitmap {
3094 container versionbitmap {
3095 uses ofp_hello_elem_versionbitmap;
3096
3097 description
3098 "";
3099 }
3100 }
3101 }
3102
3103
3104 }
3105
3106 grouping ofp_hello_elem_versionbitmap {
3107 description
3108 "Version bitmap Hello Element";
3109 list bitmaps {
3110 key "bitmaps";
3111 leaf bitmaps {
3112 type uint32;
3113 description
3114 "List of bitmaps - supported versions";
3115 }
3116 description
3117 "List of bitmaps - supported versions";
3118 }
3119
3120
3121
3122 }
3123
3124 container ofp_hello {
3125 description
3126 "OFPT_HELLO. This message includes zero or more hello elements having
3127 variable size. Unknown elements types must be ignored skipped, to allow
3128 for future extensions.ofp_header header;";
3129 list elements {
3130 key "type";
3131 uses ofp_hello_elem_header;
3132
3133 description
3134 "Hello element list0 or more";
3135 }
3136
3137
3138
3139 }
3140
3141 container ofp_switch_config {
3142 description
3143 "Switch configuration.";
3144 leaf flags {
3145 type uint32;
3146 description
3147 "ofp_header header;
3148Bitmap of OFPC_ flags.";
3149 }
3150
3151 leaf miss_send_len {
3152 type uint32;
3153 description
3154 "Max bytes of packet that datapath
3155should send to the controller. See
3156ofp_controller_max_len for valid values.";
3157 }
3158
3159
3160
3161 }
3162
3163 container ofp_table_mod {
3164 description
3165 "Configure Modify behavior of a flow table";
3166 leaf table_id {
3167 type uint32;
3168 description
3169 "ofp_header header;
3170ID of the table, OFPTT_ALL indicates all tables";
3171 }
3172
3173 leaf config {
3174 type uint32;
3175 description
3176 "Bitmap of OFPTC_ flags";
3177 }
3178
3179
3180
3181 }
3182
3183 grouping ofp_port {
3184 description
3185 "Description of a port";
3186 leaf port_no {
3187 type uint32;
3188 description
3189 "";
3190 }
3191
3192 list hw_addr {
3193 key "hw_addr";
3194 leaf hw_addr {
3195 type uint32;
3196 description
3197 " OFP_ETH_ALEN ;";
3198 }
3199 description
3200 " OFP_ETH_ALEN ;";
3201 }
3202
3203 leaf name {
3204 type string;
3205 description
3206 "Null-terminated";
3207 }
3208
3209 leaf config {
3210 type uint32;
3211 description
3212 "Bitmap of OFPPC_ flags.";
3213 }
3214
3215 leaf state {
3216 type uint32;
3217 description
3218 "Bitmap of OFPPS_ flags.";
3219 }
3220
3221 leaf curr {
3222 type uint32;
3223 description
3224 "Bitmaps of OFPPF_ that describe features. All bits zeroed if
3225 unsupported or unavailable.Current features.";
3226 }
3227
3228 leaf advertised {
3229 type uint32;
3230 description
3231 "Features being advertised by the port.";
3232 }
3233
3234 leaf supported {
3235 type uint32;
3236 description
3237 "Features supported by the port.";
3238 }
3239
3240 leaf peer {
3241 type uint32;
3242 description
3243 "Features advertised by peer.";
3244 }
3245
3246 leaf curr_speed {
3247 type uint32;
3248 description
3249 "Current port bitrate in kbps.";
3250 }
3251
3252 leaf max_speed {
3253 type uint32;
3254 description
3255 "Max port bitrate in kbps";
3256 }
3257
3258
3259
3260 }
3261
3262 grouping ofp_switch_features {
3263 description
3264 "Switch features.";
3265 leaf datapath_id {
3266 type uint64;
3267 description
3268 "ofp_header header;
3269Datapath unique ID. The lower 48-bits are for
3270a MAC address, while the upper 16-bits are
3271implementer-defined.";
3272 }
3273
3274 leaf n_buffers {
3275 type uint32;
3276 description
3277 "Max packets buffered at once.";
3278 }
3279
3280 leaf n_tables {
3281 type uint32;
3282 description
3283 "Number of tables supported by datapath.";
3284 }
3285
3286 leaf auxiliary_id {
3287 type uint32;
3288 description
3289 "Identify auxiliary connections";
3290 }
3291
3292 leaf capabilities {
3293 type uint32;
3294 description
3295 "Features.Bitmap of support ofp_capabilities .";
3296 }
3297
3298
3299
3300 }
3301
3302 grouping ofp_port_status {
3303 description
3304 "A physical port has changed in the datapath";
3305 leaf reason {
3306 type ofp_port_reason;
3307
3308 description
3309 "ofp_header header;
3310One of OFPPR_ .";
3311 }
3312
3313 container desc {
3314 uses ofp_port;
3315
3316 description
3317 "";
3318 }
3319
3320
3321
3322 }
3323
3324 container ofp_port_mod {
3325 description
3326 "Modify behavior of the physical port";
3327 leaf port_no {
3328 type uint32;
3329 description
3330 "ofp_header header;";
3331 }
3332
3333 list hw_addr {
3334 key "hw_addr";
3335 leaf hw_addr {
3336 type uint32;
3337 description
3338 " OFP_ETH_ALEN ;";
3339 }
3340 description
3341 " OFP_ETH_ALEN ;";
3342 }
3343
3344 leaf config {
3345 type uint32;
3346 description
3347 "The hardware address is not
3348configurable. This is used to
3349sanity-check the request, so it must
3350be the same as returned in an
3351ofp_port struct.Bitmap of OFPPC_ flags.";
3352 }
3353
3354 leaf mask {
3355 type uint32;
3356 description
3357 "Bitmap of OFPPC_ flags to be changed.";
3358 }
3359
3360 leaf advertise {
3361 type uint32;
3362 description
3363 "Bitmap of OFPPF_ . Zero all bits to prevent
3364any action taking place.";
3365 }
3366
3367
3368
3369 }
3370
3371 grouping ofp_match {
3372 description
3373 "Fields to match against flows";
3374 leaf type {
3375 type ofp_match_type;
3376
3377 description
3378 "One of OFPMT_ ";
3379 }
3380
3381 list oxm_fields {
3382 key "oxm_class";
3383 uses ofp_oxm_field;
3384
3385 description
3386 "0 or more";
3387 }
3388
3389
3390
3391 }
3392
3393 grouping ofp_oxm_field {
3394 description
3395 "OXM Flow match fields";
3396 leaf oxm_class {
3397 type ofp_oxm_class;
3398
3399 description
3400 "";
3401 }
3402
3403
3404
3405 choice choice_0 {
3406 case ofb_field {
3407 container ofb_field {
3408 uses ofp_oxm_ofb_field;
3409
3410 description
3411 "2 and 3 reserved for NXM_0 and NXM-1 OXM classes";
3412 }
3413 }
3414 case experimenter_field {
3415 container experimenter_field {
3416 uses ofp_oxm_experimenter_field;
3417
3418 description
3419 "";
3420 }
3421 }
3422 }
3423
3424
3425 }
3426
3427 grouping ofp_oxm_ofb_field {
3428 description
3429 "OXM OpenFlow Basic Match Field";
3430 leaf type {
3431 type oxm_ofb_field_types;
3432
3433 description
3434 "";
3435 }
3436
3437 leaf has_mask {
3438 type boolean;
3439 description
3440 "";
3441 }
3442
3443
3444
3445 choice choice_0 {
3446 case port {
3447 leaf port {
3448 type uint32;
3449 description
3450 "#define OXM_OF_IN_PORT OXM_HEADER (0x8000, OFPXMT_OFB_IN_PORT, 4)
3451Used for OFPXMT_OFB_IN_PORTOpenFlow port on which the packet was received.
3452 May be a physical port, a logical port, or the reserved port OFPP_LOCAL
3453
3454 Prereqs: None.
3455
3456 Format: 32-bit integer in network byte order.
3457
3458 Masking: Not maskable.";
3459 }
3460 }
3461 case physical_port {
3462 leaf physical_port {
3463 type uint32;
3464 description
3465 "#define OXM_OF_IN_PHY_PORT OXM_HEADER (0x8000, OFPXMT_OFB_IN_PHY_PORT, 4)
3466Used for OFPXMT_OF_IN_PHY_PORTPhysical port on which the packet was received.
3467
3468 Consider a packet received on a tunnel interface defined over a link
3469 aggregation group (LAG) with two physical port members. If the tunnel
3470 interface is the logical port bound to OpenFlow. In this case,
3471 OFPXMT_OF_IN_PORT is the tunnel's port number and OFPXMT_OF_IN_PHY_PORT is
3472 the physical port number of the LAG on which the tunnel is configured.
3473
3474 When a packet is received directly on a physical port and not processed by a
3475 logical port, OFPXMT_OF_IN_PORT and OFPXMT_OF_IN_PHY_PORT have the same
3476 value.
3477
3478 This field is usually not available in a regular match and only available
3479 in ofp_packet_in messages when it's different from OXM_OF_IN_PORT.
3480
3481 Prereqs: OXM_OF_IN_PORT must be present.
3482
3483 Format: 32-bit integer in network byte order.
3484
3485 Masking: Not maskable.";
3486 }
3487 }
3488 case table_metadata {
3489 leaf table_metadata {
3490 type uint64;
3491 description
3492 "#define OXM_OF_METADATA OXM_HEADER (0x8000, OFPXMT_OFB_METADATA, 8)
3493#define OXM_OF_METADATA_W OXM_HEADER_W(0x8000, OFPXMT_OFB_METADATA, 8)
3494Used for OFPXMT_OFB_METADATATable metadata.
3495
3496 Prereqs: None.
3497
3498 Format: 64-bit integer in network byte order.
3499
3500 Masking: Arbitrary masks.";
3501 }
3502 }
3503 case eth_dst {
3504 leaf eth_dst {
3505 type binary;
3506 description
3507 "#define OXM_OF_ETH_DST OXM_HEADER (0x8000, OFPXMT_OFB_ETH_DST, 6)
3508#define OXM_OF_ETH_DST_W OXM_HEADER_W(0x8000, OFPXMT_OFB_ETH_DST, 6)
3509#define OXM_OF_ETH_SRC OXM_HEADER (0x8000, OFPXMT_OFB_ETH_SRC, 6)
3510#define OXM_OF_ETH_SRC_W OXM_HEADER_W(0x8000, OFPXMT_OFB_ETH_SRC, 6)
3511Used for OFPXMT_OFB_ETH_DST (exactly 6 bytes)Source or destination address in Ethernet header.
3512
3513 Prereqs: None.
3514
3515 Format: 48-bit Ethernet MAC address.
3516
3517 Masking: Arbitrary masks.";
3518 }
3519 }
3520 case eth_src {
3521 leaf eth_src {
3522 type binary;
3523 description
3524 "Used for OFPXMT_OFB_ETH_SRC (exactly 6 bytes)";
3525 }
3526 }
3527 case eth_type {
3528 leaf eth_type {
3529 type uint32;
3530 description
3531 "#define OXM_OF_ETH_TYPE OXM_HEADER (0x8000, OFPXMT_OFB_ETH_TYPE,2)
3532Used for OFPXMT_OFB_ETH_TYPEPacket's Ethernet type.
3533
3534 Prereqs: None.
3535
3536 Format: 16-bit integer in network byte order.
3537
3538 Masking: Not maskable.";
3539 }
3540 }
3541 case vlan_vid {
3542 leaf vlan_vid {
3543 type uint32;
3544 description
3545 "#define OXM_OF_VLAN_VID OXM_HEADER (0x8000, OFPXMT_OFB_VLAN_VID, 2)
3546#define OXM_OF_VLAN_VID_W OXM_HEADER_W(0x8000, OFPXMT_OFB_VLAN_VID, 2)
3547Used for OFPXMT_OFB_VLAN_VID802.1Q VID.
3548
3549 For a packet with an 802.1Q header, this is the VLAN-ID (VID) from the
3550 outermost tag, with the CFI bit forced to 1. For a packet with no 802.1Q
3551 header, this has value OFPVID_NONE.
3552
3553 Prereqs: None.
3554
3555 Format: 16-bit integer in network byte order with bit 13 indicating
3556 presence of VLAN header and 3 most-significant bits forced to 0.
3557 Only the lower 13 bits have meaning.
3558
3559 Masking: Arbitrary masks.
3560
3561 This field can be used in various ways:
3562
3563 - If it is not constrained at all, the nx_match matches packets without
3564 an 802.1Q header or with an 802.1Q header that has any VID value.
3565
3566 - Testing for an exact match with 0x0 matches only packets without
3567 an 802.1Q header.
3568
3569 - Testing for an exact match with a VID value with CFI=1 matches packets
3570 that have an 802.1Q header with a specified VID.
3571
3572 - Testing for an exact match with a nonzero VID value with CFI=0 does
3573 not make sense. The switch may reject this combination.
3574
3575 - Testing with nxm_value=0, nxm_mask=0x0fff matches packets with no 802.1Q
3576 header or with an 802.1Q header with a VID of 0.
3577
3578 - Testing with nxm_value=0x1000, nxm_mask=0x1000 matches packets with
3579 an 802.1Q header that has any VID value.";
3580 }
3581 }
3582 case vlan_pcp {
3583 leaf vlan_pcp {
3584 type uint32;
3585 description
3586 "#define OXM_OF_VLAN_PCP OXM_HEADER (0x8000, OFPXMT_OFB_VLAN_PCP, 1)
3587Used for OFPXMT_OFB_VLAN_PCP802.1Q PCP.
3588
3589 For a packet with an 802.1Q header, this is the VLAN-PCP from the
3590 outermost tag. For a packet with no 802.1Q header, this has value
3591 0.
3592
3593 Prereqs: OXM_OF_VLAN_VID must be different from OFPVID_NONE.
3594
3595 Format: 8-bit integer with 5 most-significant bits forced to 0.
3596 Only the lower 3 bits have meaning.
3597
3598 Masking: Not maskable.";
3599 }
3600 }
3601 case ip_dscp {
3602 leaf ip_dscp {
3603 type uint32;
3604 description
3605 "#define OXM_OF_IP_DSCP OXM_HEADER (0x8000, OFPXMT_OFB_IP_DSCP, 1)
3606Used for OFPXMT_OFB_IP_DSCPThe Diff Serv Code Point (DSCP) bits of the IP header.
3607 Part of the IPv4 ToS field or the IPv6 Traffic Class field.
3608
3609 Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
3610
3611 Format: 8-bit integer with 2 most-significant bits forced to 0.
3612 Only the lower 6 bits have meaning.
3613
3614 Masking: Not maskable.";
3615 }
3616 }
3617 case ip_ecn {
3618 leaf ip_ecn {
3619 type uint32;
3620 description
3621 "#define OXM_OF_IP_ECN OXM_HEADER (0x8000, OFPXMT_OFB_IP_ECN, 1)
3622Used for OFPXMT_OFB_IP_ECNThe ECN bits of the IP header.
3623 Part of the IPv4 ToS field or the IPv6 Traffic Class field.
3624
3625 Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
3626
3627 Format: 8-bit integer with 6 most-significant bits forced to 0.
3628 Only the lower 2 bits have meaning.
3629
3630 Masking: Not maskable.";
3631 }
3632 }
3633 case ip_proto {
3634 leaf ip_proto {
3635 type uint32;
3636 description
3637 "#define OXM_OF_IP_PROTO OXM_HEADER (0x8000, OFPXMT_OFB_IP_PROTO, 1)
3638Used for OFPXMT_OFB_IP_PROTOThe protocol byte in the IP header.
3639
3640 Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
3641
3642 Format: 8-bit integer.
3643
3644 Masking: Not maskable.";
3645 }
3646 }
3647 case ipv4_src {
3648 leaf ipv4_src {
3649 type uint32;
3650 description
3651 "#define OXM_OF_IPV4_SRC OXM_HEADER (0x8000, OFPXMT_OFB_IPV4_SRC, 4)
3652#define OXM_OF_IPV4_SRC_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV4_SRC, 4)
3653#define OXM_OF_IPV4_DST OXM_HEADER (0x8000, OFPXMT_OFB_IPV4_DST, 4)
3654#define OXM_OF_IPV4_DST_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV4_DST, 4)
3655Used for OFPXMT_OFB_IPV4_SRCThe source or destination address in the IP header.
3656
3657 Prereqs: OXM_OF_ETH_TYPE must match 0x0800 exactly.
3658
3659 Format: 32-bit integer in network byte order.
3660
3661 Masking: Arbitrary masks.";
3662 }
3663 }
3664 case ipv4_dst {
3665 leaf ipv4_dst {
3666 type uint32;
3667 description
3668 "Used for OFPXMT_OFB_IPV4_DST";
3669 }
3670 }
3671 case tcp_src {
3672 leaf tcp_src {
3673 type uint32;
3674 description
3675 "#define OXM_OF_TCP_SRC OXM_HEADER (0x8000, OFPXMT_OFB_TCP_SRC, 2)
3676#define OXM_OF_TCP_DST OXM_HEADER (0x8000, OFPXMT_OFB_TCP_DST, 2)
3677Used for OFPXMT_OFB_TCP_SRCThe source or destination port in the TCP header.
3678
3679 Prereqs:
3680 OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
3681 OXM_OF_IP_PROTO must match 6 exactly.
3682
3683 Format: 16-bit integer in network byte order.
3684
3685 Masking: Not maskable.";
3686 }
3687 }
3688 case tcp_dst {
3689 leaf tcp_dst {
3690 type uint32;
3691 description
3692 "Used for OFPXMT_OFB_TCP_DST";
3693 }
3694 }
3695 case udp_src {
3696 leaf udp_src {
3697 type uint32;
3698 description
3699 "#define OXM_OF_UDP_SRC OXM_HEADER (0x8000, OFPXMT_OFB_UDP_SRC, 2)
3700#define OXM_OF_UDP_DST OXM_HEADER (0x8000, OFPXMT_OFB_UDP_DST, 2)
3701Used for OFPXMT_OFB_UDP_SRCThe source or destination port in the UDP header.
3702
3703 Prereqs:
3704 OXM_OF_ETH_TYPE must match either 0x0800 or 0x86dd.
3705 OXM_OF_IP_PROTO must match 17 exactly.
3706
3707 Format: 16-bit integer in network byte order.
3708
3709 Masking: Not maskable.";
3710 }
3711 }
3712 case udp_dst {
3713 leaf udp_dst {
3714 type uint32;
3715 description
3716 "Used for OFPXMT_OFB_UDP_DST";
3717 }
3718 }
3719 case sctp_src {
3720 leaf sctp_src {
3721 type uint32;
3722 description
3723 "#define OXM_OF_SCTP_SRC OXM_HEADER (0x8000, OFPXMT_OFB_SCTP_SRC, 2)
3724#define OXM_OF_SCTP_DST OXM_HEADER (0x8000, OFPXMT_OFB_SCTP_DST, 2)
3725Used for OFPXMT_OFB_SCTP_SRCThe source or destination port in the SCTP header.
3726
3727 Prereqs:
3728 OXM_OF_ETH_TYPE must match either 0x0800 or 0x86dd.
3729 OXM_OF_IP_PROTO must match 132 exactly.
3730
3731 Format: 16-bit integer in network byte order.
3732
3733 Masking: Not maskable.";
3734 }
3735 }
3736 case sctp_dst {
3737 leaf sctp_dst {
3738 type uint32;
3739 description
3740 "Used for OFPXMT_OFB_SCTP_DST";
3741 }
3742 }
3743 case icmpv4_type {
3744 leaf icmpv4_type {
3745 type uint32;
3746 description
3747 "#define OXM_OF_ICMPV4_TYPE OXM_HEADER (0x8000, OFPXMT_OFB_ICMPV4_TYPE, 1)
3748#define OXM_OF_ICMPV4_CODE OXM_HEADER (0x8000, OFPXMT_OFB_ICMPV4_CODE, 1)
3749Used for OFPXMT_OFB_ICMPV4_TYPEThe type or code in the ICMP header.
3750
3751 Prereqs:
3752 OXM_OF_ETH_TYPE must match 0x0800 exactly.
3753 OXM_OF_IP_PROTO must match 1 exactly.
3754
3755 Format: 8-bit integer.
3756
3757 Masking: Not maskable.";
3758 }
3759 }
3760 case icmpv4_code {
3761 leaf icmpv4_code {
3762 type uint32;
3763 description
3764 "Used for OFPXMT_OFB_ICMPV4_CODE";
3765 }
3766 }
3767 case arp_op {
3768 leaf arp_op {
3769 type uint32;
3770 description
3771 "#define OXM_OF_ARP_OP OXM_HEADER (0x8000, OFPXMT_OFB_ARP_OP, 2)
3772Used for OFPXMT_OFB_ARP_OPARP opcode.
3773
3774 For an Ethernet+IP ARP packet, the opcode in the ARP header. Always 0
3775 otherwise.
3776
3777 Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
3778
3779 Format: 16-bit integer in network byte order.
3780
3781 Masking: Not maskable.";
3782 }
3783 }
3784 case arp_spa {
3785 leaf arp_spa {
3786 type uint32;
3787 description
3788 "#define OXM_OF_ARP_SPA OXM_HEADER (0x8000, OFPXMT_OFB_ARP_SPA, 4)
3789#define OXM_OF_ARP_SPA_W OXM_HEADER_W(0x8000, OFPXMT_OFB_ARP_SPA, 4)
3790#define OXM_OF_ARP_TPA OXM_HEADER (0x8000, OFPXMT_OFB_ARP_TPA, 4)
3791#define OXM_OF_ARP_TPA_W OXM_HEADER_W(0x8000, OFPXMT_OFB_ARP_TPA, 4)
3792For OFPXMT_OFB_ARP_SPAFor an Ethernet+IP ARP packet, the source or target protocol address
3793 in the ARP header. Always 0 otherwise.
3794
3795 Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
3796
3797 Format: 32-bit integer in network byte order.
3798
3799 Masking: Arbitrary masks.";
3800 }
3801 }
3802 case arp_tpa {
3803 leaf arp_tpa {
3804 type uint32;
3805 description
3806 "For OFPXMT_OFB_ARP_TPA";
3807 }
3808 }
3809 case arp_sha {
3810 leaf arp_sha {
3811 type binary;
3812 description
3813 "#define OXM_OF_ARP_SHA OXM_HEADER (0x8000, OFPXMT_OFB_ARP_SHA, 6)
3814#define OXM_OF_ARP_SHA_W OXM_HEADER_W (0x8000, OFPXMT_OFB_ARP_SHA, 6)
3815#define OXM_OF_ARP_THA OXM_HEADER (0x8000, OFPXMT_OFB_ARP_THA, 6)
3816#define OXM_OF_ARP_THA_W OXM_HEADER_W (0x8000, OFPXMT_OFB_ARP_THA, 6)
3817For OFPXMT_OFB_ARP_SHA (6 bytes)For an Ethernet+IP ARP packet, the source or target hardware address
3818 in the ARP header. Always 0 otherwise.
3819
3820 Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
3821
3822 Format: 48-bit Ethernet MAC address.
3823
3824 Masking: Not maskable.";
3825 }
3826 }
3827 case arp_tha {
3828 leaf arp_tha {
3829 type binary;
3830 description
3831 "For OFPXMT_OFB_ARP_THA (6 bytes)";
3832 }
3833 }
3834 case ipv6_src {
3835 leaf ipv6_src {
3836 type binary;
3837 description
3838 "#define OXM_OF_IPV6_SRC OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_SRC, 16)
3839#define OXM_OF_IPV6_SRC_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_SRC, 16)
3840#define OXM_OF_IPV6_DST OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_DST, 16)
3841#define OXM_OF_IPV6_DST_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_DST, 16)
3842For OFPXMT_OFB_IPV6_SRCThe source or destination address in the IPv6 header.
3843
3844 Prereqs: OXM_OF_ETH_TYPE must match 0x86dd exactly.
3845
3846 Format: 128-bit IPv6 address.
3847
3848 Masking: Arbitrary masks.";
3849 }
3850 }
3851 case ipv6_dst {
3852 leaf ipv6_dst {
3853 type binary;
3854 description
3855 "For OFPXMT_OFB_IPV6_DST";
3856 }
3857 }
3858 case ipv6_flabel {
3859 leaf ipv6_flabel {
3860 type uint32;
3861 description
3862 "#define OXM_OF_IPV6_FLABEL OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_FLABEL, 4)
3863#define OXM_OF_IPV6_FLABEL_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_FLABEL, 4)
3864For OFPXMT_OFB_IPV6_FLABELThe IPv6 Flow Label
3865
3866 Prereqs:
3867 OXM_OF_ETH_TYPE must match 0x86dd exactly
3868
3869 Format: 32-bit integer with 12 most-significant bits forced to 0.
3870 Only the lower 20 bits have meaning.
3871
3872 Masking: Arbitrary masks.";
3873 }
3874 }
3875 case icmpv6_type {
3876 leaf icmpv6_type {
3877 type uint32;
3878 description
3879 "#define OXM_OF_ICMPV6_TYPE OXM_HEADER (0x8000, OFPXMT_OFB_ICMPV6_TYPE, 1)
3880#define OXM_OF_ICMPV6_CODE OXM_HEADER (0x8000, OFPXMT_OFB_ICMPV6_CODE, 1)
3881For OFPXMT_OFB_ICMPV6_TYPEThe type or code in the ICMPv6 header.
3882
3883 Prereqs:
3884 OXM_OF_ETH_TYPE must match 0x86dd exactly.
3885 OXM_OF_IP_PROTO must match 58 exactly.
3886
3887 Format: 8-bit integer.
3888
3889 Masking: Not maskable.";
3890 }
3891 }
3892 case icmpv6_code {
3893 leaf icmpv6_code {
3894 type uint32;
3895 description
3896 "For OFPXMT_OFB_ICMPV6_CODE";
3897 }
3898 }
3899 case ipv6_nd_target {
3900 leaf ipv6_nd_target {
3901 type binary;
3902 description
3903 "#define OXM_OF_IPV6_ND_TARGET OXM_HEADER
3904 (0x8000, OFPXMT_OFB_IPV6_ND_TARGET, 16)
3905For OFPXMT_OFB_IPV6_ND_TARGETThe target address in an IPv6 Neighbor Discovery message.
3906
3907 Prereqs:
3908 OXM_OF_ETH_TYPE must match 0x86dd exactly.
3909 OXM_OF_IP_PROTO must match 58 exactly.
3910 OXM_OF_ICMPV6_TYPE must be either 135 or 136.
3911
3912 Format: 128-bit IPv6 address.
3913
3914 Masking: Not maskable.";
3915 }
3916 }
3917 case ipv6_nd_ssl {
3918 leaf ipv6_nd_ssl {
3919 type binary;
3920 description
3921 "#define OXM_OF_IPV6_ND_SLL OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_ND_SLL, 6)
3922For OFPXMT_OFB_IPV6_ND_SLLThe source link-layer address option in an IPv6 Neighbor Discovery
3923 message.
3924
3925 Prereqs:
3926 OXM_OF_ETH_TYPE must match 0x86dd exactly.
3927 OXM_OF_IP_PROTO must match 58 exactly.
3928 OXM_OF_ICMPV6_TYPE must be exactly 135.
3929
3930 Format: 48-bit Ethernet MAC address.
3931
3932 Masking: Not maskable.";
3933 }
3934 }
3935 case ipv6_nd_tll {
3936 leaf ipv6_nd_tll {
3937 type binary;
3938 description
3939 "#define OXM_OF_IPV6_ND_TLL OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_ND_TLL, 6)
3940For OFPXMT_OFB_IPV6_ND_TLLThe target link-layer address option in an IPv6 Neighbor Discovery
3941 message.
3942
3943 Prereqs:
3944 OXM_OF_ETH_TYPE must match 0x86dd exactly.
3945 OXM_OF_IP_PROTO must match 58 exactly.
3946 OXM_OF_ICMPV6_TYPE must be exactly 136.
3947
3948 Format: 48-bit Ethernet MAC address.
3949
3950 Masking: Not maskable.";
3951 }
3952 }
3953 case mpls_label {
3954 leaf mpls_label {
3955 type uint32;
3956 description
3957 "#define OXM_OF_MPLS_LABEL OXM_HEADER (0x8000, OFPXMT_OFB_MPLS_LABEL, 4)
3958For OFPXMT_OFB_MPLS_LABELThe LABEL in the first MPLS shim header.
3959
3960 Prereqs:
3961 OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
3962
3963 Format: 32-bit integer in network byte order with 12 most-significant
3964 bits forced to 0. Only the lower 20 bits have meaning.
3965
3966 Masking: Not maskable.";
3967 }
3968 }
3969 case mpls_tc {
3970 leaf mpls_tc {
3971 type uint32;
3972 description
3973 "#define OXM_OF_MPLS_TC OXM_HEADER (0x8000, OFPXMT_OFB_MPLS_TC, 1)
3974For OFPXMT_OFB_MPLS_TCThe TC in the first MPLS shim header.
3975
3976 Prereqs:
3977 OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
3978
3979 Format: 8-bit integer with 5 most-significant bits forced to 0.
3980 Only the lower 3 bits have meaning.
3981
3982 Masking: Not maskable.";
3983 }
3984 }
3985 case mpls_bos {
3986 leaf mpls_bos {
3987 type uint32;
3988 description
3989 "#define OXM_OF_MPLS_BOS OXM_HEADER (0x8000, OFPXMT_OFB_MPLS_BOS, 1)
3990For OFPXMT_OFB_MPLS_BOSThe BoS bit in the first MPLS shim header.
3991
3992 Prereqs:
3993 OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
3994
3995 Format: 8-bit integer with 7 most-significant bits forced to 0.
3996 Only the lowest bit have a meaning.
3997
3998 Masking: Not maskable.";
3999 }
4000 }
4001 case pbb_isid {
4002 leaf pbb_isid {
4003 type uint32;
4004 description
4005 "#define OXM_OF_PBB_ISID OXM_HEADER (0x8000, OFPXMT_OFB_PBB_ISID, 3)
4006#define OXM_OF_PBB_ISID_W OXM_HEADER_W(0x8000, OFPXMT_OFB_PBB_ISID, 3)
4007For OFPXMT_OFB_PBB_ISIDIEEE 802.1ah I-SID.
4008
4009 For a packet with a PBB header, this is the I-SID from the
4010 outermost service tag.
4011
4012 Prereqs:
4013 OXM_OF_ETH_TYPE must match 0x88E7 exactly.
4014
4015 Format: 24-bit integer in network byte order.
4016
4017 Masking: Arbitrary masks.";
4018 }
4019 }
4020 case tunnel_id {
4021 leaf tunnel_id {
4022 type uint64;
4023 description
4024 "#define OXM_OF_TUNNEL_ID OXM_HEADER (0x8000, OFPXMT_OFB_TUNNEL_ID, 8)
4025#define OXM_OF_TUNNEL_ID_W OXM_HEADER_W(0x8000, OFPXMT_OFB_TUNNEL_ID, 8)
4026For OFPXMT_OFB_TUNNEL_IDLogical Port Metadata.
4027
4028 Metadata associated with a logical port.
4029 If the logical port performs encapsulation and decapsulation, this
4030 is the demultiplexing field from the encapsulation header.
4031 For example, for a packet received via GRE tunnel including a (32-bit) key,
4032 the key is stored in the low 32-bits and the high bits are zeroed.
4033 For a MPLS logical port, the low 20 bits represent the MPLS Label.
4034 For a VxLAN logical port, the low 24 bits represent the VNI.
4035 If the packet is not received through a logical port, the value is 0.
4036
4037 Prereqs: None.
4038
4039 Format: 64-bit integer in network byte order.
4040
4041 Masking: Arbitrary masks.";
4042 }
4043 }
4044 case ipv6_exthdr {
4045 leaf ipv6_exthdr {
4046 type uint32;
4047 description
4048 "#define OXM_OF_IPV6_EXTHDR OXM_HEADER (0x8000, OFPXMT_OFB_IPV6_EXTHDR, 2)
4049#define OXM_OF_IPV6_EXTHDR_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_EXTHDR, 2)
4050For OFPXMT_OFB_IPV6_EXTHDRThe IPv6 Extension Header pseudo-field.
4051
4052 Prereqs:
4053 OXM_OF_ETH_TYPE must match 0x86dd exactly
4054
4055 Format: 16-bit integer with 7 most-significant bits forced to 0.
4056 Only the lower 9 bits have meaning.
4057
4058 Masking: Maskable.";
4059 }
4060 }
4061 }
4062 choice choice_1 {
4063 case table_metadata_mask {
4064 leaf table_metadata_mask {
4065 type uint64;
4066 description
4067 "For OFPXMT_OFB_METADATA";
4068 }
4069 }
4070 case eth_dst_mask {
4071 leaf eth_dst_mask {
4072 type binary;
4073 description
4074 "For OFPXMT_OFB_ETH_DST (exactly 6 bytes)";
4075 }
4076 }
4077 case eth_src_mask {
4078 leaf eth_src_mask {
4079 type binary;
4080 description
4081 "For OFPXMT_OFB_ETH_SRC (exactly 6 bytes)";
4082 }
4083 }
4084 case vlan_vid_mask {
4085 leaf vlan_vid_mask {
4086 type uint32;
4087 description
4088 "For OFPXMT_OFB_VLAN_VID";
4089 }
4090 }
4091 case ipv4_src_mask {
4092 leaf ipv4_src_mask {
4093 type uint32;
4094 description
4095 "For OFPXMT_OFB_IPV4_SRC";
4096 }
4097 }
4098 case ipv4_dst_mask {
4099 leaf ipv4_dst_mask {
4100 type uint32;
4101 description
4102 "For OFPXMT_OFB_IPV4_DST";
4103 }
4104 }
4105 case arp_spa_mask {
4106 leaf arp_spa_mask {
4107 type uint32;
4108 description
4109 "For OFPXMT_OFB_ARP_SPA";
4110 }
4111 }
4112 case arp_tpa_mask {
4113 leaf arp_tpa_mask {
4114 type uint32;
4115 description
4116 "For OFPXMT_OFB_ARP_TPA";
4117 }
4118 }
4119 case ipv6_src_mask {
4120 leaf ipv6_src_mask {
4121 type binary;
4122 description
4123 "For OFPXMT_OFB_IPV6_SRC";
4124 }
4125 }
4126 case ipv6_dst_mask {
4127 leaf ipv6_dst_mask {
4128 type binary;
4129 description
4130 "For OFPXMT_OFB_IPV6_DST";
4131 }
4132 }
4133 case ipv6_flabel_mask {
4134 leaf ipv6_flabel_mask {
4135 type uint32;
4136 description
4137 "For OFPXMT_OFB_IPV6_FLABEL";
4138 }
4139 }
4140 case pbb_isid_mask {
4141 leaf pbb_isid_mask {
4142 type uint32;
4143 description
4144 "For OFPXMT_OFB_PBB_ISID";
4145 }
4146 }
4147 case tunnel_id_mask {
4148 leaf tunnel_id_mask {
4149 type uint64;
4150 description
4151 "For OFPXMT_OFB_TUNNEL_ID";
4152 }
4153 }
4154 case ipv6_exthdr_mask {
4155 leaf ipv6_exthdr_mask {
4156 type uint32;
4157 description
4158 "For OFPXMT_OFB_IPV6_EXTHDR";
4159 }
4160 }
4161 }
4162
4163
4164 }
4165
4166 grouping ofp_oxm_experimenter_field {
4167 description
4168 "Header for OXM experimenter match fields.
4169 The experimenter class should not use OXM_HEADER() macros for defining
4170 fields due to this extra header.";
4171 leaf oxm_header {
4172 type uint32;
4173 description
4174 "oxm_class = OFPXMC_EXPERIMENTER";
4175 }
4176
4177 leaf experimenter {
4178 type uint32;
4179 description
4180 "Experimenter ID which takes the same
4181form as in struct ofp_experimenter_header.";
4182 }
4183
4184
4185
4186 }
4187
4188 grouping ofp_action {
4189 description
4190 "Action header that is common to all actions. The length includes the
4191 header and any padding used to make the action 64-bit aligned.
4192 NB: The length of an action must always be a multiple of eight.";
4193 leaf type {
4194 type ofp_action_type;
4195
4196 description
4197 "One of OFPAT_ .";
4198 }
4199
4200
4201
4202 choice choice_0 {
4203 case output {
4204 container output {
4205 uses ofp_action_output;
4206
4207 description
4208 "";
4209 }
4210 }
4211 case mpls_ttl {
4212 container mpls_ttl {
4213 uses ofp_action_mpls_ttl;
4214
4215 description
4216 "";
4217 }
4218 }
4219 case push {
4220 container push {
4221 uses ofp_action_push;
4222
4223 description
4224 "";
4225 }
4226 }
4227 case pop_mpls {
4228 container pop_mpls {
4229 uses ofp_action_pop_mpls;
4230
4231 description
4232 "";
4233 }
4234 }
4235 case group {
4236 container group {
4237 uses ofp_action_group;
4238
4239 description
4240 "";
4241 }
4242 }
4243 case nw_ttl {
4244 container nw_ttl {
4245 uses ofp_action_nw_ttl;
4246
4247 description
4248 "";
4249 }
4250 }
4251 case set_field {
4252 container set_field {
4253 uses ofp_action_set_field;
4254f
4255 description
4256 "";
4257 }
4258 }
4259 case experimenter {
4260 container experimenter {
4261 uses ofp_action_experimenter;
4262
4263 description
4264 "";
4265 }
4266 }
4267 }
4268
4269
4270 }
4271
4272 grouping ofp_action_output {
4273 description
4274 "Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
4275 When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
4276 number of bytes to send. A 'max_len' of zero means no bytes of the
4277 packet should be sent. A 'max_len' of OFPCML_NO_BUFFER means that
4278 the packet is not buffered and the complete packet is to be sent to
4279 the controller.";
4280 leaf port {
4281 type uint32;
4282 description
4283 "Output port.";
4284 }
4285
4286 leaf max_len {
4287 type uint32;
4288 description
4289 "Max length to send to controller.";
4290 }
4291
4292
4293
4294 }
4295
4296 grouping ofp_action_mpls_ttl {
4297 description
4298 "Action structure for OFPAT_SET_MPLS_TTL.";
4299 leaf mpls_ttl {
4300 type uint32;
4301 description
4302 "MPLS TTL";
4303 }
4304
4305
4306
4307 }
4308
4309 grouping ofp_action_push {
4310 description
4311 "Action structure for OFPAT_PUSH_VLAN MPLS PBB.";
4312 leaf ethertype {
4313 type uint32;
4314 description
4315 "Ethertype";
4316 }
4317
4318
4319
4320 }
4321
4322 grouping ofp_action_pop_mpls {
4323 description
4324 "Action structure for OFPAT_POP_MPLS.";
4325 leaf ethertype {
4326 type uint32;
4327 description
4328 "Ethertype";
4329 }
4330
4331
4332
4333 }
4334
4335 grouping ofp_action_group {
4336 description
4337 "Action structure for OFPAT_GROUP.";
4338 leaf group_id {
4339 type uint32;
4340 description
4341 "Group identifier.";
4342 }
4343
4344
4345
4346 }
4347
4348 grouping ofp_action_nw_ttl {
4349 description
4350 "Action structure for OFPAT_SET_NW_TTL.";
4351 leaf nw_ttl {
4352 type uint32;
4353 description
4354 "IP TTL";
4355 }
4356
4357
4358
4359 }
4360
4361 grouping ofp_action_set_field {
4362 description
4363 "Action structure for OFPAT_SET_FIELD.";
4364 container field {
4365 uses ofp_oxm_field;
4366
4367 description
4368 "";
4369 }
4370
4371
4372
4373 }
4374
4375 grouping ofp_action_experimenter {
4376 description
4377 "Action header for OFPAT_EXPERIMENTER.
4378 The rest of the body is experimenter-defined.";
4379 leaf experimenter {
4380 type uint32;
4381 description
4382 "Experimenter ID which takes the same
4383form as in struct
4384ofp_experimenter_header.";
4385 }
4386
4387 leaf data {
4388 type binary;
4389 description
4390 "";
4391 }
4392
4393
4394
4395 }
4396
4397 grouping ofp_instruction {
4398 description
4399 "Instruction header that is common to all instructions. The length includes
4400 the header and any padding used to make the instruction 64-bit aligned.
4401 NB: The length of an instruction must always be a multiple of eight.";
4402 leaf type {
4403 type uint32;
4404 description
4405 "Instruction type";
4406 }
4407
4408
4409
4410 choice choice_0 {
4411 case goto_table {
4412 container goto_table {
4413 uses ofp_instruction_goto_table;
4414
4415 description
4416 "";
4417 }
4418 }
4419 case write_metadata {
4420 container write_metadata {
4421 uses ofp_instruction_write_metadata;
4422
4423 description
4424 "";
4425 }
4426 }
4427 case actions {
4428 container actions {
4429 uses ofp_instruction_actions;
4430
4431 description
4432 "";
4433 }
4434 }
4435 case meter {
4436 container meter {
4437 uses ofp_instruction_meter;
4438
4439 description
4440 "";
4441 }
4442 }
4443 case experimenter {
4444 container experimenter {
4445 uses ofp_instruction_experimenter;
4446
4447 description
4448 "";
4449 }
4450 }
4451 }
4452
4453
4454 }
4455
4456 grouping ofp_instruction_goto_table {
4457 description
4458 "Instruction structure for OFPIT_GOTO_TABLE";
4459 leaf table_id {
4460 type uint32;
4461 description
4462 "Set next table in the lookup pipeline";
4463 }
4464
4465
4466
4467 }
4468
4469 grouping ofp_instruction_write_metadata {
4470 description
4471 "Instruction structure for OFPIT_WRITE_METADATA";
4472 leaf metadata {
4473 type uint64;
4474 description
4475 "Metadata value to write";
4476 }
4477
4478 leaf metadata_mask {
4479 type uint64;
4480 description
4481 "Metadata write bitmask";
4482 }
4483
4484
4485
4486 }
4487
4488 grouping ofp_instruction_actions {
4489 description
4490 "Instruction structure for OFPIT_WRITE APPLY CLEAR_ACTIONS";
4491 list actions {
4492 key "type";
4493 uses ofp_action;
4494
4495 description
4496 "0 or more actions associated
4497with OFPIT_WRITE_ACTIONS and
4498OFPIT_APPLY_ACTIONS";
4499 }
4500
4501
4502
4503 }
4504
4505 grouping ofp_instruction_meter {
4506 description
4507 "Instruction structure for OFPIT_METER";
4508 leaf meter_id {
4509 type uint32;
4510 description
4511 "Meter instance.";
4512 }
4513
4514
4515
4516 }
4517
4518 grouping ofp_instruction_experimenter {
4519 description
4520 "Instruction structure for experimental instructions";
4521 leaf experimenter {
4522 type uint32;
4523 description
4524 "Experimenter ID which takes the same form
4525as in struct ofp_experimenter_header.";
4526 }
4527
4528 leaf data {
4529 type binary;
4530 description
4531 "Experimenter-defined arbitrary additional data.";
4532 }
4533
4534
4535
4536 }
4537
4538 grouping ofp_flow_mod {
4539 description
4540 "Flow setup and teardown (controller - datapath).";
4541 leaf cookie {
4542 type uint64;
4543 description
4544 "ofp_header header;
4545Opaque controller-issued identifier.";
4546 }
4547
4548 leaf cookie_mask {
4549 type uint64;
4550 description
4551 "Mask used to restrict the cookie bits
4552that must match when the command is
4553OFPFC_MODIFY or OFPFC_DELETE . A value
4554of 0 indicates no restriction.";
4555 }
4556
4557 leaf table_id {
4558 type uint32;
4559 description
4560 "ID of the table to put the flow in.
4561For OFPFC_DELETE_ commands, OFPTT_ALL
4562can also be used to delete matching
4563flows from all tables.";
4564 }
4565
4566 leaf command {
4567 type ofp_flow_mod_command;
4568
4569 description
4570 "One of OFPFC_ .";
4571 }
4572
4573 leaf idle_timeout {
4574 type uint32;
4575 description
4576 "Idle time before discarding (seconds).";
4577 }
4578
4579 leaf hard_timeout {
4580 type uint32;
4581 description
4582 "Max time before discarding (seconds).";
4583 }
4584
4585 leaf priority {
4586 type uint32;
4587 description
4588 "Priority level of flow entry.";
4589 }
4590
4591 leaf buffer_id {
4592 type uint32;
4593 description
4594 "Buffered packet to apply to, or
4595OFP_NO_BUFFER.
4596Not meaningful for OFPFC_DELETE .";
4597 }
4598
4599 leaf out_port {
4600 type uint32;
4601 description
4602 "For OFPFC_DELETE commands, require
4603matching entries to include this as an
4604output port. A value of OFPP_ANY
4605indicates no restriction.";
4606 }
4607
4608 leaf out_group {
4609 type uint32;
4610 description
4611 "For OFPFC_DELETE commands, require
4612matching entries to include this as an
4613output group. A value of OFPG_ANY
4614indicates no restriction.";
4615 }
4616
4617 leaf flags {
4618 type uint32;
4619 description
4620 "Bitmap of OFPFF_ flags.";
4621 }
4622
4623 container match {
4624 uses ofp_match;
4625
4626 description
4627 "Fields to match. Variable size.";
4628 }
4629
4630 list instructions {
4631 key "type";
4632 uses ofp_instruction;
4633
4634 description
4635 "0 or more.";
4636 }
4637
4638
4639
4640 }
4641
4642 grouping ofp_bucket {
4643 description
4644 "Bucket for use in groups.";
4645 leaf weight {
4646 type uint32;
4647 description
4648 "Relative weight of bucket. Only
4649defined for select groups.";
4650 }
4651
4652 leaf watch_port {
4653 type uint32;
4654 description
4655 "Port whose state affects whether this
4656bucket is live. Only required for fast
4657failover groups.";
4658 }
4659
4660 leaf watch_group {
4661 type uint32;
4662 description
4663 "Group whose state affects whether this
4664bucket is live. Only required for fast
4665failover groups.";
4666 }
4667
4668 list actions {
4669 key "type";
4670 uses ofp_action;
4671
4672 description
4673 "";
4674 }
4675
4676
4677
4678 }
4679
4680 grouping ofp_group_mod {
4681 description
4682 "Group setup and teardown (controller - datapath).";
4683 leaf command {
4684 type ofp_group_mod_command;
4685
4686 description
4687 "ofp_header header;
4688One of OFPGC_ .";
4689 }
4690
4691 leaf type {
4692 type ofp_group_type;
4693
4694 description
4695 "One of OFPGT_ .";
4696 }
4697
4698 leaf group_id {
4699 type uint32;
4700 description
4701 "Group identifier.";
4702 }
4703
4704 list buckets {
4705 key "weight";
4706 uses ofp_bucket;
4707
4708 description
4709 "";
4710 }
4711
4712
4713
4714 }
4715
4716 grouping ofp_packet_out {
4717 description
4718 "Send packet (controller - datapath).Special buffer-id to indicate 'no buffer'#define OFP_NO_BUFFER 0xffffffff";
4719 leaf buffer_id {
4720 type uint32;
4721 description
4722 "ofp_header header;
4723ID assigned by datapath (OFP_NO_BUFFER
4724if none).";
4725 }
4726
4727 leaf in_port {
4728 type uint32;
4729 description
4730 "Packet's input port or OFPP_CONTROLLER.";
4731 }
4732
4733 list actions {
4734 key "type";
4735 uses ofp_action;
4736
4737 description
4738 "Action list - 0 or more.";
4739 }
4740
4741 leaf data {
4742 type binary;
4743 description
4744 "The variable size action list is optionally followed by packet data.
4745 This data is only present and meaningful if buffer_id == -1.Packet data.";
4746 }
4747
4748
4749
4750 }
4751
4752 grouping ofp_packet_in {
4753 description
4754 "Packet received on port (datapath - controller).";
4755 leaf buffer_id {
4756 type uint32;
4757 description
4758 "ofp_header header;
4759ID assigned by datapath.";
4760 }
4761
4762 leaf reason {
4763 type ofp_packet_in_reason;
4764
4765 description
4766 "Reason packet is being sent";
4767 }
4768
4769 leaf table_id {
4770 type uint32;
4771 description
4772 "ID of the table that was looked up";
4773 }
4774
4775 leaf cookie {
4776 type uint64;
4777 description
4778 "Cookie of the flow entry that was looked up.";
4779 }
4780
4781 container match {
4782 uses ofp_match;
4783
4784 description
4785 "Packet metadata. Variable size.";
4786 }
4787
4788 leaf data {
4789 type binary;
4790 description
4791 "Ethernet frame";
4792 }
4793
4794
4795
4796 }
4797
4798 container ofp_flow_removed {
4799 description
4800 "Flow removed (datapath - controller).";
4801 leaf cookie {
4802 type uint64;
4803 description
4804 "ofp_header header;
4805Opaque controller-issued identifier.";
4806 }
4807
4808 leaf priority {
4809 type uint32;
4810 description
4811 "Priority level of flow entry.";
4812 }
4813
4814 leaf reason {
4815 type ofp_flow_removed_reason;
4816
4817 description
4818 "One of OFPRR_ .";
4819 }
4820
4821 leaf table_id {
4822 type uint32;
4823 description
4824 "ID of the table";
4825 }
4826
4827 leaf duration_sec {
4828 type uint32;
4829 description
4830 "Time flow was alive in seconds.";
4831 }
4832
4833 leaf duration_nsec {
4834 type uint32;
4835 description
4836 "Time flow was alive in nanoseconds beyond
4837duration_sec.";
4838 }
4839
4840 leaf idle_timeout {
4841 type uint32;
4842 description
4843 "Idle timeout from original flow mod.";
4844 }
4845
4846 leaf hard_timeout {
4847 type uint32;
4848 description
4849 "Hard timeout from original flow mod.";
4850 }
4851
4852 leaf packet_count {
4853 type uint64;
4854 description
4855 "";
4856 }
4857
4858 leaf byte_count {
4859 type uint64;
4860 description
4861 "";
4862 }
4863
4864 container match {
4865 uses ofp_match;
4866
4867 description
4868 "Description of fields. Variable size.";
4869 }
4870
4871
4872
4873 }
4874
4875 grouping ofp_meter_band_header {
4876 description
4877 "Common header for all meter bands";
4878 leaf type {
4879 type ofp_meter_band_type;
4880
4881 description
4882 "One of OFPMBT_ .";
4883 }
4884
4885 leaf len {
4886 type uint32;
4887 description
4888 "Length in bytes of this band.";
4889 }
4890
4891 leaf rate {
4892 type uint32;
4893 description
4894 "Rate for this band.";
4895 }
4896
4897 leaf burst_size {
4898 type uint32;
4899 description
4900 "Size of bursts.";
4901 }
4902
4903
4904
4905 }
4906
4907 container ofp_meter_band_drop {
4908 description
4909 "OFPMBT_DROP band - drop packets";
4910 leaf type {
4911 type uint32;
4912 description
4913 "OFPMBT_DROP.";
4914 }
4915
4916 leaf len {
4917 type uint32;
4918 description
4919 "Length in bytes of this band.";
4920 }
4921
4922 leaf rate {
4923 type uint32;
4924 description
4925 "Rate for dropping packets.";
4926 }
4927
4928 leaf burst_size {
4929 type uint32;
4930 description
4931 "Size of bursts.";
4932 }
4933
4934
4935
4936 }
4937
4938 container ofp_meter_band_dscp_remark {
4939 description
4940 "OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header";
4941 leaf type {
4942 type uint32;
4943 description
4944 "OFPMBT_DSCP_REMARK.";
4945 }
4946
4947 leaf len {
4948 type uint32;
4949 description
4950 "Length in bytes of this band.";
4951 }
4952
4953 leaf rate {
4954 type uint32;
4955 description
4956 "Rate for remarking packets.";
4957 }
4958
4959 leaf burst_size {
4960 type uint32;
4961 description
4962 "Size of bursts.";
4963 }
4964
4965 leaf prec_level {
4966 type uint32;
4967 description
4968 "Number of drop precedence level to add.";
4969 }
4970
4971
4972
4973 }
4974
4975 container ofp_meter_band_experimenter {
4976 description
4977 "OFPMBT_EXPERIMENTER band - Experimenter type.
4978 The rest of the band is experimenter-defined.";
4979 leaf type {
4980 type ofp_meter_band_type;
4981
4982 description
4983 "One of OFPMBT_ .";
4984 }
4985
4986 leaf len {
4987 type uint32;
4988 description
4989 "Length in bytes of this band.";
4990 }
4991
4992 leaf rate {
4993 type uint32;
4994 description
4995 "Rate for this band.";
4996 }
4997
4998 leaf burst_size {
4999 type uint32;
5000 description
5001 "Size of bursts.";
5002 }
5003
5004 leaf experimenter {
5005 type uint32;
5006 description
5007 "Experimenter ID which takes the
5008same form as in struct
5009ofp_experimenter_header.";
5010 }
5011
5012
5013
5014 }
5015
5016 container ofp_meter_mod {
5017 description
5018 "Meter configuration. OFPT_METER_MOD.";
5019 leaf command {
5020 type ofp_meter_mod_command;
5021
5022 description
5023 "ofp_header header = 1;
5024One of OFPMC_ .";
5025 }
5026
5027 leaf flags {
5028 type uint32;
5029 description
5030 "Bitmap of OFPMF_ flags.";
5031 }
5032
5033 leaf meter_id {
5034 type uint32;
5035 description
5036 "Meter instance.";
5037 }
5038
5039 list bands {
5040 key "type";
5041 uses ofp_meter_band_header;
5042
5043 description
5044 "The band list length is
5045inferred from the length field
5046in the header.";
5047 }
5048
5049
5050
5051 }
5052
5053 container ofp_error_msg {
5054 description
5055 "OFPT_ERROR: Error message (datapath - controller).";
5056 leaf type {
5057 type uint32;
5058 description
5059 "ofp_header header;";
5060 }
5061
5062 leaf code {
5063 type uint32;
5064 description
5065 "";
5066 }
5067
5068 leaf data {
5069 type binary;
5070 description
5071 "Variable-length data. Interpreted based
5072on the type and code. No padding.";
5073 }
5074
5075
5076
5077 }
5078
5079 container ofp_error_experimenter_msg {
5080 description
5081 "OFPET_EXPERIMENTER: Error message (datapath - controller).ofp_header header;";
5082 leaf type {
5083 type uint32;
5084 description
5085 "OFPET_EXPERIMENTER.";
5086 }
5087
5088 leaf exp_type {
5089 type uint32;
5090 description
5091 "Experimenter defined.";
5092 }
5093
5094 leaf experimenter {
5095 type uint32;
5096 description
5097 "Experimenter ID which takes the same form
5098as in struct ofp_experimenter_header.";
5099 }
5100
5101 leaf data {
5102 type binary;
5103 description
5104 "Variable-length data. Interpreted based
5105on the type and code. No padding.";
5106 }
5107
5108
5109
5110 }
5111
5112 container ofp_multipart_request {
5113 description
5114 "";
5115 leaf type {
5116 type ofp_multipart_type;
5117
5118 description
5119 "ofp_header header;
5120One of the OFPMP_ constants.";
5121 }
5122
5123 leaf flags {
5124 type uint32;
5125 description
5126 "OFPMPF_REQ_ flags.";
5127 }
5128
5129 leaf body {
5130 type binary;
5131 description
5132 "Body of the request. 0 or more bytes.";
5133 }
5134
5135
5136
5137 }
5138
5139 container ofp_multipart_reply {
5140 description
5141 "";
5142 leaf type {
5143 type ofp_multipart_type;
5144
5145 description
5146 "ofp_header header;
5147One of the OFPMP_ constants.";
5148 }
5149
5150 leaf flags {
5151 type uint32;
5152 description
5153 "OFPMPF_REPLY_ flags.";
5154 }
5155
5156 leaf body {
5157 type binary;
5158 description
5159 "Body of the reply. 0 or more bytes.";
5160 }
5161
5162
5163
5164 }
5165
5166 grouping ofp_desc {
5167 description
5168 "Body of reply to OFPMP_DESC request. Each entry is a NULL-terminated
5169 ASCII string.#define DESC_STR_LEN 256
5170#define SERIAL_NUM_LEN 32";
5171 leaf mfr_desc {
5172 type string;
5173 description
5174 "Manufacturer description.";
5175 }
5176
5177 leaf hw_desc {
5178 type string;
5179 description
5180 "Hardware description.";
5181 }
5182
5183 leaf sw_desc {
5184 type string;
5185 description
5186 "Software description.";
5187 }
5188
5189 leaf serial_num {
5190 type string;
5191 description
5192 "Serial number.";
5193 }
5194
5195 leaf dp_desc {
5196 type string;
5197 description
5198 "Human readable description of datapath.";
5199 }
5200
5201
5202
5203 }
5204
5205 container ofp_flow_stats_request {
5206 description
5207 "Body for ofp_multipart_request of type OFPMP_FLOW.";
5208 leaf table_id {
5209 type uint32;
5210 description
5211 "ID of table to read (from ofp_table_stats),
5212OFPTT_ALL for all tables.";
5213 }
5214
5215 leaf out_port {
5216 type uint32;
5217 description
5218 "Require matching entries to include this
5219as an output port. A value of OFPP_ANY
5220indicates no restriction.";
5221 }
5222
5223 leaf out_group {
5224 type uint32;
5225 description
5226 "Require matching entries to include this
5227as an output group. A value of OFPG_ANY
5228indicates no restriction.";
5229 }
5230
5231 leaf cookie {
5232 type uint64;
5233 description
5234 "Require matching entries to contain this
5235cookie value";
5236 }
5237
5238 leaf cookie_mask {
5239 type uint64;
5240 description
5241 "Mask used to restrict the cookie bits that
5242must match. A value of 0 indicates
5243no restriction.";
5244 }
5245
5246 container match {
5247 uses ofp_match;
5248
5249 description
5250 "Fields to match. Variable size.";
5251 }
5252
5253
5254
5255 }
5256
5257 grouping ofp_flow_stats {
5258 description
5259 "Body of reply to OFPMP_FLOW request.";
5260 leaf id {
5261 type uint64;
5262 description
5263 "Unique ID of flow within device.";
5264 }
5265
5266 leaf table_id {
5267 type uint32;
5268 description
5269 "ID of table flow came from.";
5270 }
5271
5272 leaf duration_sec {
5273 type uint32;
5274 description
5275 "Time flow has been alive in seconds.";
5276 }
5277
5278 leaf duration_nsec {
5279 type uint32;
5280 description
5281 "Time flow has been alive in nanoseconds
5282beyond duration_sec.";
5283 }
5284
5285 leaf priority {
5286 type uint32;
5287 description
5288 "Priority of the entry.";
5289 }
5290
5291 leaf idle_timeout {
5292 type uint32;
5293 description
5294 "Number of seconds idle before expiration.";
5295 }
5296
5297 leaf hard_timeout {
5298 type uint32;
5299 description
5300 "Number of seconds before expiration.";
5301 }
5302
5303 leaf flags {
5304 type uint32;
5305 description
5306 "Bitmap of OFPFF_ flags.";
5307 }
5308
5309 leaf cookie {
5310 type uint64;
5311 description
5312 "Opaque controller-issued identifier.";
5313 }
5314
5315 leaf packet_count {
5316 type uint64;
5317 description
5318 "Number of packets in flow.";
5319 }
5320
5321 leaf byte_count {
5322 type uint64;
5323 description
5324 "Number of bytes in flow.";
5325 }
5326
5327 container match {
5328 uses ofp_match;
5329
5330 description
5331 "Description of fields. Variable size.";
5332 }
5333
5334 list instructions {
5335 key "type";
5336 uses ofp_instruction;
5337
5338 description
5339 "Instruction set
5340(0 or more)";
5341 }
5342
5343
5344
5345 }
5346
5347 container ofp_aggregate_stats_request {
5348 description
5349 "Body for ofp_multipart_request of type OFPMP_AGGREGATE.";
5350 leaf table_id {
5351 type uint32;
5352 description
5353 "ID of table to read (from ofp_table_stats)
5354OFPTT_ALL for all tables.";
5355 }
5356
5357 leaf out_port {
5358 type uint32;
5359 description
5360 "Require matching entries to include this
5361as an output port. A value of OFPP_ANY
5362indicates no restriction.";
5363 }
5364
5365 leaf out_group {
5366 type uint32;
5367 description
5368 "Require matching entries to include this
5369as an output group. A value of OFPG_ANY
5370indicates no restriction.";
5371 }
5372
5373 leaf cookie {
5374 type uint64;
5375 description
5376 "Require matching entries to contain this
5377cookie value";
5378 }
5379
5380 leaf cookie_mask {
5381 type uint64;
5382 description
5383 "Mask used to restrict the cookie bits that
5384must match. A value of 0 indicates
5385no restriction.";
5386 }
5387
5388 container match {
5389 uses ofp_match;
5390
5391 description
5392 "Fields to match. Variable size.";
5393 }
5394
5395
5396
5397 }
5398
5399 container ofp_aggregate_stats_reply {
5400 description
5401 "Body of reply to OFPMP_AGGREGATE request.";
5402 leaf packet_count {
5403 type uint64;
5404 description
5405 "Number of packets in flows.";
5406 }
5407
5408 leaf byte_count {
5409 type uint64;
5410 description
5411 "Number of bytes in flows.";
5412 }
5413
5414 leaf flow_count {
5415 type uint32;
5416 description
5417 "Number of flows.";
5418 }
5419
5420
5421
5422 }
5423
5424 grouping ofp_table_feature_property {
5425 description
5426 "Common header for all Table Feature Properties";
5427 leaf type {
5428 type ofp_table_feature_prop_type;
5429
5430 description
5431 "One of OFPTFPT_ .";
5432 }
5433
5434
5435
5436 choice choice_0 {
5437 case instructions {
5438 container instructions {
5439 uses ofp_table_feature_prop_instructions;
5440
5441 description
5442 "";
5443 }
5444 }
5445 case next_tables {
5446 container next_tables {
5447 uses ofp_table_feature_prop_next_tables;
5448
5449 description
5450 "";
5451 }
5452 }
5453 case actions {
5454 container actions {
5455 uses ofp_table_feature_prop_actions;
5456
5457 description
5458 "";
5459 }
5460 }
5461 case oxm {
5462 container oxm {
5463 uses ofp_table_feature_prop_oxm;
5464
5465 description
5466 "";
5467 }
5468 }
5469 case experimenter {
5470 container experimenter {
5471 uses ofp_table_feature_prop_experimenter;
5472
5473 description
5474 "";
5475 }
5476 }
5477 }
5478
5479
5480 }
5481
5482 grouping ofp_table_feature_prop_instructions {
5483 description
5484 "Instructions property";
5485 list instructions {
5486 key "type";
5487 uses ofp_instruction;
5488
5489 description
5490 "One of OFPTFPT_INSTRUCTIONS,
5491OFPTFPT_INSTRUCTIONS_MISS.List of instructions";
5492 }
5493
5494
5495
5496 }
5497
5498 grouping ofp_table_feature_prop_next_tables {
5499 description
5500 "Next Tables property";
5501 list next_table_ids {
5502 key "next_table_ids";
5503 leaf next_table_ids {
5504 type uint32;
5505 description
5506 "One of OFPTFPT_NEXT_TABLES,
5507OFPTFPT_NEXT_TABLES_MISS.List of table ids.";
5508 }
5509 description
5510 "One of OFPTFPT_NEXT_TABLES,
5511OFPTFPT_NEXT_TABLES_MISS.List of table ids.";
5512 }
5513
5514
5515
5516 }
5517
5518 grouping ofp_table_feature_prop_actions {
5519 description
5520 "Actions property";
5521 list actions {
5522 key "type";
5523 uses ofp_action;
5524
5525 description
5526 "One of OFPTFPT_WRITE_ACTIONS,
5527OFPTFPT_WRITE_ACTIONS_MISS,
5528OFPTFPT_APPLY_ACTIONS,
5529OFPTFPT_APPLY_ACTIONS_MISS.List of actions";
5530 }
5531
5532
5533
5534 }
5535
5536 grouping ofp_table_feature_prop_oxm {
5537 description
5538 "Match, Wildcard or Set-Field propertyOne of OFPTFPT_MATCH,
5539OFPTFPT_WILDCARDS,
5540OFPTFPT_WRITE_SETFIELD,
5541OFPTFPT_WRITE_SETFIELD_MISS,
5542OFPTFPT_APPLY_SETFIELD,
5543OFPTFPT_APPLY_SETFIELD_MISS.";
5544 list oxm_ids {
5545 key "oxm_ids";
5546 leaf oxm_ids {
5547 type uint32;
5548 description
5549 "TODO is this a uint32???Array of OXM headers";
5550 }
5551 description
5552 "TODO is this a uint32???Array of OXM headers";
5553 }
5554
5555
5556
5557 }
5558
5559 grouping ofp_table_feature_prop_experimenter {
5560 description
5561 "Experimenter table feature property";
5562 leaf experimenter {
5563 type uint32;
5564 description
5565 "One of OFPTFPT_EXPERIMENTER,
5566OFPTFPT_EXPERIMENTER_MISS.Experimenter ID which takes the same
5567form as in struct
5568ofp_experimenter_header.";
5569 }
5570
5571 leaf exp_type {
5572 type uint32;
5573 description
5574 "Experimenter defined.";
5575 }
5576
5577 list experimenter_data {
5578 key "experimenter_data";
5579 leaf experimenter_data {
5580 type uint32;
5581 description
5582 "";
5583 }
5584 description
5585 "";
5586 }
5587
5588
5589
5590 }
5591
5592 container ofp_table_features {
5593 description
5594 "Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES.
5595 Body of reply to OFPMP_TABLE_FEATURES request.";
5596 leaf table_id {
5597 type uint32;
5598 description
5599 "Identifier of table. Lower numbered tables
5600are consulted first.";
5601 }
5602
5603 leaf name {
5604 type string;
5605 description
5606 "";
5607 }
5608
5609 leaf metadata_match {
5610 type uint64;
5611 description
5612 "Bits of metadata table can match.";
5613 }
5614
5615 leaf metadata_write {
5616 type uint64;
5617 description
5618 "Bits of metadata table can write.";
5619 }
5620
5621 leaf config {
5622 type uint32;
5623 description
5624 "Bitmap of OFPTC_ values";
5625 }
5626
5627 leaf max_entries {
5628 type uint32;
5629 description
5630 "Max number of entries supported.";
5631 }
5632
5633 list properties {
5634 key "type";
5635 uses ofp_table_feature_property;
5636
5637 description
5638 "Table Feature Property list";
5639 }
5640
5641
5642
5643 }
5644
5645 container ofp_table_stats {
5646 description
5647 "Body of reply to OFPMP_TABLE request.";
5648 leaf table_id {
5649 type uint32;
5650 description
5651 "Identifier of table. Lower numbered tables
5652are consulted first.";
5653 }
5654
5655 leaf active_count {
5656 type uint32;
5657 description
5658 "Number of active entries.";
5659 }
5660
5661 leaf lookup_count {
5662 type uint64;
5663 description
5664 "Number of packets looked up in table.";
5665 }
5666
5667 leaf matched_count {
5668 type uint64;
5669 description
5670 "Number of packets that hit table.";
5671 }
5672
5673
5674
5675 }
5676
5677 container ofp_port_stats_request {
5678 description
5679 "Body for ofp_multipart_request of type OFPMP_PORT.";
5680 leaf port_no {
5681 type uint32;
5682 description
5683 "OFPMP_PORT message must request statistics
5684 either for a single port (specified in
5685 port_no) or for all ports (if port_no ==
5686 OFPP_ANY).";
5687 }
5688
5689
5690
5691 }
5692
5693 container ofp_port_stats {
5694 description
5695 "Body of reply to OFPMP_PORT request. If a counter is unsupported, set
5696 the field to all ones.";
5697 leaf port_no {
5698 type uint32;
5699 description
5700 "";
5701 }
5702
5703 leaf rx_packets {
5704 type uint64;
5705 description
5706 "Number of received packets.";
5707 }
5708
5709 leaf tx_packets {
5710 type uint64;
5711 description
5712 "Number of transmitted packets.";
5713 }
5714
5715 leaf rx_bytes {
5716 type uint64;
5717 description
5718 "Number of received bytes.";
5719 }
5720
5721 leaf tx_bytes {
5722 type uint64;
5723 description
5724 "Number of transmitted bytes.";
5725 }
5726
5727 leaf rx_dropped {
5728 type uint64;
5729 description
5730 "Number of packets dropped by RX.";
5731 }
5732
5733 leaf tx_dropped {
5734 type uint64;
5735 description
5736 "Number of packets dropped by TX.";
5737 }
5738
5739 leaf rx_errors {
5740 type uint64;
5741 description
5742 "Number of receive errors. This is a super-set
5743of more specific receive errors and should be
5744greater than or equal to the sum of all
5745rx_ _err values.";
5746 }
5747
5748 leaf tx_errors {
5749 type uint64;
5750 description
5751 "Number of transmit errors. This is a super-set
5752of more specific transmit errors and should be
5753greater than or equal to the sum of all
5754tx_ _err values (none currently defined.)";
5755 }
5756
5757 leaf rx_frame_err {
5758 type uint64;
5759 description
5760 "Number of frame alignment errors.";
5761 }
5762
5763 leaf rx_over_err {
5764 type uint64;
5765 description
5766 "Number of packets with RX overrun.";
5767 }
5768
5769 leaf rx_crc_err {
5770 type uint64;
5771 description
5772 "Number of CRC errors.";
5773 }
5774
5775 leaf collisions {
5776 type uint64;
5777 description
5778 "Number of collisions.";
5779 }
5780
5781 leaf duration_sec {
5782 type uint32;
5783 description
5784 "Time port has been alive in seconds.";
5785 }
5786
5787 leaf duration_nsec {
5788 type uint32;
5789 description
5790 "Time port has been alive in nanoseconds
5791beyond duration_sec.";
5792 }
5793
5794
5795
5796 }
5797
5798 container ofp_group_stats_request {
5799 description
5800 "Body of OFPMP_GROUP request.";
5801 leaf group_id {
5802 type uint32;
5803 description
5804 "All groups if OFPG_ALL.";
5805 }
5806
5807
5808
5809 }
5810
5811 grouping ofp_bucket_counter {
5812 description
5813 "Used in group stats replies.";
5814 leaf packet_count {
5815 type uint64;
5816 description
5817 "Number of packets processed by bucket.";
5818 }
5819
5820 leaf byte_count {
5821 type uint64;
5822 description
5823 "Number of bytes processed by bucket.";
5824 }
5825
5826
5827
5828 }
5829
5830 grouping ofp_group_stats {
5831 description
5832 "Body of reply to OFPMP_GROUP request.";
5833 leaf group_id {
5834 type uint32;
5835 description
5836 "Group identifier.";
5837 }
5838
5839 leaf ref_count {
5840 type uint32;
5841 description
5842 "Number of flows or groups that directly
5843forward to this group.";
5844 }
5845
5846 leaf packet_count {
5847 type uint64;
5848 description
5849 "Number of packets processed by group.";
5850 }
5851
5852 leaf byte_count {
5853 type uint64;
5854 description
5855 "Number of bytes processed by group.";
5856 }
5857
5858 leaf duration_sec {
5859 type uint32;
5860 description
5861 "Time group has been alive in seconds.";
5862 }
5863
5864 leaf duration_nsec {
5865 type uint32;
5866 description
5867 "Time group has been alive in nanoseconds
5868beyond duration_sec.";
5869 }
5870
5871 list bucket_stats {
5872 key "packet_count";
5873 uses ofp_bucket_counter;
5874
5875 description
5876 "One counter set per
5877bucket.";
5878 }
5879
5880
5881
5882 }
5883
5884 grouping ofp_group_desc {
5885 description
5886 "Body of reply to OFPMP_GROUP_DESC request.";
5887 leaf type {
5888 type ofp_group_type;
5889
5890 description
5891 "One of OFPGT_ .";
5892 }
5893
5894 leaf group_id {
5895 type uint32;
5896 description
5897 "Group identifier.";
5898 }
5899
5900 list buckets {
5901 key "weight";
5902 uses ofp_bucket;
5903
5904 description
5905 "List of buckets - 0 or more.";
5906 }
5907
5908
5909
5910 }
5911
5912 grouping ofp_group_entry {
5913 description
5914 "";
5915 leaf type {
5916 type ofp_group_type;
5917
5918 description
5919 "One of OFPGT_ .";
5920 }
5921
5922 leaf group_id {
5923 type uint32;
5924 description
5925 "Group identifier.";
5926 }
5927
5928 list buckets {
5929 key "weight";
5930 uses ofp_bucket;
5931
5932 description
5933 "List of buckets - 0 or more.";
5934 }
5935
5936 container stats {
5937 uses ofp_group_stats;
5938
5939 description
5940 "";
5941 }
5942
5943
5944
5945 }
5946
5947 container ofp_group_features {
5948 description
5949 "Body of reply to OFPMP_GROUP_FEATURES request. Group features.";
5950 leaf types {
5951 type uint32;
5952 description
5953 "Bitmap of (1 OFPGT_ ) values supported.";
5954 }
5955
5956 leaf capabilities {
5957 type uint32;
5958 description
5959 "Bitmap of OFPGFC_ capability supported.";
5960 }
5961
5962 list max_groups {
5963 key "max_groups";
5964 leaf max_groups {
5965 type uint32;
5966 description
5967 "Maximum number of groups for each type.";
5968 }
5969 description
5970 "Maximum number of groups for each type.";
5971 }
5972
5973 list actions {
5974 key "actions";
5975 leaf actions {
5976 type uint32;
5977 description
5978 "Bitmaps of (1 OFPAT_ ) values
5979supported.";
5980 }
5981 description
5982 "Bitmaps of (1 OFPAT_ ) values
5983supported.";
5984 }
5985
5986
5987
5988 }
5989
5990 container ofp_meter_multipart_request {
5991 description
5992 "Body of OFPMP_METER and OFPMP_METER_CONFIG requests.";
5993 leaf meter_id {
5994 type uint32;
5995 description
5996 "Meter instance, or OFPM_ALL.";
5997 }
5998
5999
6000
6001 }
6002
6003 grouping ofp_meter_band_stats {
6004 description
6005 "Statistics for each meter band";
6006 leaf packet_band_count {
6007 type uint64;
6008 description
6009 "Number of packets in band.";
6010 }
6011
6012 leaf byte_band_count {
6013 type uint64;
6014 description
6015 "Number of bytes in band.";
6016 }
6017
6018
6019
6020 }
6021
6022 container ofp_meter_stats {
6023 description
6024 "Body of reply to OFPMP_METER request. Meter statistics.";
6025 leaf meter_id {
6026 type uint32;
6027 description
6028 "Meter instance.";
6029 }
6030
6031 leaf flow_count {
6032 type uint32;
6033 description
6034 "Number of flows bound to meter.";
6035 }
6036
6037 leaf packet_in_count {
6038 type uint64;
6039 description
6040 "Number of packets in input.";
6041 }
6042
6043 leaf byte_in_count {
6044 type uint64;
6045 description
6046 "Number of bytes in input.";
6047 }
6048
6049 leaf duration_sec {
6050 type uint32;
6051 description
6052 "Time meter has been alive in seconds.";
6053 }
6054
6055 leaf duration_nsec {
6056 type uint32;
6057 description
6058 "Time meter has been alive in nanoseconds
6059beyond duration_sec.";
6060 }
6061
6062 list band_stats {
6063 key "packet_band_count";
6064 uses ofp_meter_band_stats;
6065
6066 description
6067 "The band_stats length is
6068inferred from the length field.";
6069 }
6070
6071
6072
6073 }
6074
6075 container ofp_meter_config {
6076 description
6077 "Body of reply to OFPMP_METER_CONFIG request. Meter configuration.";
6078 leaf flags {
6079 type uint32;
6080 description
6081 "All OFPMF_ that apply.";
6082 }
6083
6084 leaf meter_id {
6085 type uint32;
6086 description
6087 "Meter instance.";
6088 }
6089
6090 list bands {
6091 key "type";
6092 uses ofp_meter_band_header;
6093
6094 description
6095 "The bands length is
6096inferred from the length field.";
6097 }
6098
6099
6100
6101 }
6102
6103 container ofp_meter_features {
6104 description
6105 "Body of reply to OFPMP_METER_FEATURES request. Meter features.";
6106 leaf max_meter {
6107 type uint32;
6108 description
6109 "Maximum number of meters.";
6110 }
6111
6112 leaf band_types {
6113 type uint32;
6114 description
6115 "Bitmaps of (1 OFPMBT_ ) values supported.";
6116 }
6117
6118 leaf capabilities {
6119 type uint32;
6120 description
6121 "Bitmaps of ofp_meter_flags .";
6122 }
6123
6124 leaf max_bands {
6125 type uint32;
6126 description
6127 "Maximum bands per meters";
6128 }
6129
6130 leaf max_color {
6131 type uint32;
6132 description
6133 "Maximum color value";
6134 }
6135
6136
6137
6138 }
6139
6140 container ofp_experimenter_multipart_header {
6141 description
6142 "Body for ofp_multipart_request reply of type OFPMP_EXPERIMENTER.";
6143 leaf experimenter {
6144 type uint32;
6145 description
6146 "Experimenter ID which takes the same form
6147as in struct ofp_experimenter_header.";
6148 }
6149
6150 leaf exp_type {
6151 type uint32;
6152 description
6153 "Experimenter defined.";
6154 }
6155
6156 leaf data {
6157 type binary;
6158 description
6159 "Experimenter-defined arbitrary additional data.";
6160 }
6161
6162
6163
6164 }
6165
6166 container ofp_experimenter_header {
6167 description
6168 "Experimenter extension.";
6169 leaf experimenter {
6170 type uint32;
6171 description
6172 "ofp_header header; Type OFPT_EXPERIMENTER.
6173Experimenter ID:
6174 - MSB 0: low-order bytes are IEEE OUI.
6175 - MSB != 0: defined by ONF.";
6176 }
6177
6178 leaf exp_type {
6179 type uint32;
6180 description
6181 "Experimenter defined.";
6182 }
6183
6184 leaf data {
6185 type binary;
6186 description
6187 "Experimenter-defined arbitrary additional data.";
6188 }
6189
6190
6191
6192 }
6193
6194 grouping ofp_queue_prop_header {
6195 description
6196 "Common description for a queue.";
6197 leaf property {
6198 type uint32;
6199 description
6200 "One of OFPQT_.";
6201 }
6202
6203 leaf len {
6204 type uint32;
6205 description
6206 "Length of property, including this header.";
6207 }
6208
6209
6210
6211 }
6212
6213 container ofp_queue_prop_min_rate {
6214 description
6215 "Min-Rate queue property description.";
6216 container prop_header {
6217 uses ofp_queue_prop_header;
6218
6219 description
6220 "prop: OFPQT_MIN, len: 16.";
6221 }
6222
6223 leaf rate {
6224 type uint32;
6225 description
6226 "In 1 10 of a percent = 0; 1000 - disabled.";
6227 }
6228
6229
6230
6231 }
6232
6233 container ofp_queue_prop_max_rate {
6234 description
6235 "Max-Rate queue property description.";
6236 container prop_header {
6237 uses ofp_queue_prop_header;
6238
6239 description
6240 "prop: OFPQT_MAX, len: 16.";
6241 }
6242
6243 leaf rate {
6244 type uint32;
6245 description
6246 "In 1 10 of a percent = 0; 1000 - disabled.";
6247 }
6248
6249
6250
6251 }
6252
6253 container ofp_queue_prop_experimenter {
6254 description
6255 "Experimenter queue property description.";
6256 container prop_header {
6257 uses ofp_queue_prop_header;
6258
6259 description
6260 "prop: OFPQT_EXPERIMENTER";
6261 }
6262
6263 leaf experimenter {
6264 type uint32;
6265 description
6266 "Experimenter ID which takes the same
6267form as in struct
6268ofp_experimenter_header.";
6269 }
6270
6271 leaf data {
6272 type binary;
6273 description
6274 "Experimenter defined data.";
6275 }
6276
6277
6278
6279 }
6280
6281 grouping ofp_packet_queue {
6282 description
6283 "Full description for a queue.";
6284 leaf queue_id {
6285 type uint32;
6286 description
6287 "id for the specific queue.";
6288 }
6289
6290 leaf port {
6291 type uint32;
6292 description
6293 "Port this queue is attached to.";
6294 }
6295
6296 list properties {
6297 key "property";
6298 uses ofp_queue_prop_header;
6299
6300 description
6301 "List of properties.";
6302 }
6303
6304
6305
6306 }
6307
6308 container ofp_queue_get_config_request {
6309 description
6310 "Query for port queue configuration.";
6311 leaf port {
6312 type uint32;
6313 description
6314 "ofp_header header;
6315Port to be queried. Should refer
6316to a valid physical port (i.e. = OFPP_MAX),
6317or OFPP_ANY to request all configured
6318queues.";
6319 }
6320
6321
6322
6323 }
6324
6325 container ofp_queue_get_config_reply {
6326 description
6327 "Queue configuration for a given port.";
6328 leaf port {
6329 type uint32;
6330 description
6331 "ofp_header header;";
6332 }
6333
6334 list queues {
6335 key "queue_id";
6336 uses ofp_packet_queue;
6337
6338 description
6339 "List of configured queues.";
6340 }
6341
6342
6343
6344 }
6345
6346 container ofp_action_set_queue {
6347 description
6348 "OFPAT_SET_QUEUE action struct: send packets to given queue on port.";
6349 leaf type {
6350 type uint32;
6351 description
6352 "OFPAT_SET_QUEUE.";
6353 }
6354
6355 leaf queue_id {
6356 type uint32;
6357 description
6358 "Queue id for the packets.";
6359 }
6360
6361
6362
6363 }
6364
6365 container ofp_queue_stats_request {
6366 description
6367 "";
6368 leaf port_no {
6369 type uint32;
6370 description
6371 "All ports if OFPP_ANY.";
6372 }
6373
6374 leaf queue_id {
6375 type uint32;
6376 description
6377 "All queues if OFPQ_ALL.";
6378 }
6379
6380
6381
6382 }
6383
6384 container ofp_queue_stats {
6385 description
6386 "";
6387 leaf port_no {
6388 type uint32;
6389 description
6390 "";
6391 }
6392
6393 leaf queue_id {
6394 type uint32;
6395 description
6396 "Queue i.d";
6397 }
6398
6399 leaf tx_bytes {
6400 type uint64;
6401 description
6402 "Number of transmitted bytes.";
6403 }
6404
6405 leaf tx_packets {
6406 type uint64;
6407 description
6408 "Number of transmitted packets.";
6409 }
6410
6411 leaf tx_errors {
6412 type uint64;
6413 description
6414 "Number of packets dropped due to overrun.";
6415 }
6416
6417 leaf duration_sec {
6418 type uint32;
6419 description
6420 "Time queue has been alive in seconds.";
6421 }
6422
6423 leaf duration_nsec {
6424 type uint32;
6425 description
6426 "Time queue has been alive in nanoseconds
6427beyond duration_sec.";
6428 }
6429
6430
6431
6432 }
6433
6434 container ofp_role_request {
6435 description
6436 "Role request and reply message.";
6437 leaf role {
6438 type ofp_controller_role;
6439
6440 description
6441 "ofp_header header; Type OFPT_ROLE_REQUEST OFPT_ROLE_REPLY.
6442One of OFPCR_ROLE_ .";
6443 }
6444
6445 leaf generation_id {
6446 type uint64;
6447 description
6448 "Master Election Generation Id";
6449 }
6450
6451
6452
6453 }
6454
6455 container ofp_async_config {
6456 description
6457 "Asynchronous message configuration.";
6458 list packet_in_mask {
6459 key "packet_in_mask";
6460 leaf packet_in_mask {
6461 type uint32;
6462 description
6463 "ofp_header header; OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC.
6464Bitmasks of OFPR_ values.";
6465 }
6466 description
6467 "ofp_header header; OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC.
6468Bitmasks of OFPR_ values.";
6469 }
6470
6471 list port_status_mask {
6472 key "port_status_mask";
6473 leaf port_status_mask {
6474 type uint32;
6475 description
6476 "Bitmasks of OFPPR_ values.";
6477 }
6478 description
6479 "Bitmasks of OFPPR_ values.";
6480 }
6481
6482 list flow_removed_mask {
6483 key "flow_removed_mask";
6484 leaf flow_removed_mask {
6485 type uint32;
6486 description
6487 "Bitmasks of OFPRR_ values.";
6488 }
6489 description
6490 "Bitmasks of OFPRR_ values.";
6491 }
6492
6493
6494
6495 }
6496
6497 grouping FlowTableUpdate {
6498 description
6499 "ADDITIONAL VOLTHA SPECIFIC MESSAGE TYPES, AIDING RPC CALLS";
6500 leaf id {
6501 type string;
6502 description
6503 "Device.id or LogicalDevice.id";
6504 }
6505
6506 container flow_mod {
6507 uses ofp_flow_mod;
6508
6509 description
6510 "";
6511 }
6512
6513
6514
6515 }
6516
6517 grouping FlowGroupTableUpdate {
6518 description
6519 "";
6520 leaf id {
6521 type string;
6522 description
6523 "Device.id or LogicalDevice.id";
6524 }
6525
6526 container group_mod {
6527 uses ofp_group_mod;
6528
6529 description
6530 "";
6531 }
6532
6533
6534
6535 }
6536
6537 grouping Flows {
6538 description
6539 "";
6540 list items {
6541 key "id";
6542 uses ofp_flow_stats;
6543
6544 description
6545 "";
6546 }
6547
6548
6549
6550 }
6551
6552 grouping FlowGroups {
6553 description
6554 "";
6555 list items {
6556 key "type";
6557 uses ofp_group_entry;
6558
6559 description
6560 "";
6561 }
6562
6563
6564
6565 }
6566
6567 grouping PacketIn {
6568 description
6569 "";
6570 leaf id {
6571 type string;
6572 description
6573 "LogicalDevice.id";
6574 }
6575
6576 container packet_in {
6577 uses ofp_packet_in;
6578
6579 description
6580 "";
6581 }
6582
6583
6584
6585 }
6586
6587 grouping PacketOut {
6588 description
6589 "";
6590 leaf id {
6591 type string;
6592 description
6593 "LogicalDevice.id";
6594 }
6595
6596 container packet_out {
6597 uses ofp_packet_out;
6598
6599 description
6600 "";
6601 }
6602
6603
6604
6605 }
6606
6607 grouping ChangeEvent {
6608 description
6609 "";
6610 leaf id {
6611 type string;
6612 description
6613 "LogicalDevice.id";
6614 }
6615
6616
6617
6618 choice choice_0 {
6619 case port_status {
6620 container port_status {
6621 uses ofp_port_status;
6622
6623 description
6624 "";
6625 }
6626 }
6627 }
6628
6629
6630 }
6631
6632
6633 /* Health related services" */
6634 rpc HealthService-GetHealthStatus {
6635 description
6636 "Return current health status of a Voltha instance";
6637 input {
6638 uses Empty;
6639
6640 }
6641 output {
6642 uses HealthStatus;
6643
6644 }
6645 }
6646
6647 /* Cluster-wide Voltha APIs
6648
6649 These APIs are potentially dispatched to the leader of the Voltha cluster,
6650 to a specific Voltha instance which owns the given device or logical device." */
6651 rpc VolthaGlobalService-GetVoltha {
6652 description
6653 "Get high level information on the Voltha cluster";
6654 input {
6655 uses Empty;
6656
6657 }
6658 output {
6659 uses Voltha_grouping;
6660 }
6661 }
6662
6663 rpc VolthaGlobalService-ListVolthaInstances {
6664 description
6665 "List all Voltha cluster instances";
6666 input {
6667 uses Empty;
6668
6669 }
6670 output {
6671 uses VolthaInstances_grouping;
6672 }
6673 }
6674
6675 rpc VolthaGlobalService-GetVolthaInstance {
6676 description
6677 "Get details on a Voltha cluster instance";
6678 input {
6679 uses ID;
6680
6681 }
6682 output {
6683 uses VolthaInstance_grouping;
6684 }
6685 }
6686
6687 rpc VolthaGlobalService-ListLogicalDevices {
6688 description
6689 "List all logical devices managed by the Voltha cluster";
6690 input {
6691 uses Empty;
6692
6693 }
6694 output {
6695 uses LogicalDevices;
6696
6697 }
6698 }
6699
6700 rpc VolthaGlobalService-GetLogicalDevice {
6701 description
6702 "Get additional information on a given logical device";
6703 input {
6704 uses ID;
6705
6706 }
6707 output {
6708 uses LogicalDevice;
6709
6710 }
6711 }
6712
6713 rpc VolthaGlobalService-ListLogicalDevicePorts {
6714 description
6715 "List ports of a logical device";
6716 input {
6717 uses ID;
6718
6719 }
6720 output {
6721 uses LogicalPorts;
6722
6723 }
6724 }
6725
6726 rpc VolthaGlobalService-ListLogicalDeviceFlows {
6727 description
6728 "List all flows of a logical device";
6729 input {
6730 uses ID;
6731
6732 }
6733 output {
6734 uses Flows;
6735
6736 }
6737 }
6738
6739 rpc VolthaGlobalService-UpdateLogicalDeviceFlowTable {
6740 description
6741 "Update flow table for logical device";
6742 input {
6743 uses FlowTableUpdate;
6744
6745 }
6746 output {
6747 uses Empty;
6748
6749 }
6750 }
6751
6752 rpc VolthaGlobalService-ListLogicalDeviceFlowGroups {
6753 description
6754 "List all flow groups of a logical device";
6755 input {
6756 uses ID;
6757
6758 }
6759 output {
6760 uses FlowGroups;
6761
6762 }
6763 }
6764
6765 rpc VolthaGlobalService-UpdateLogicalDeviceFlowGroupTable {
6766 description
6767 "Update group table for device";
6768 input {
6769 uses FlowGroupTableUpdate;
6770
6771 }
6772 output {
6773 uses Empty;
6774
6775 }
6776 }
6777
6778 rpc VolthaGlobalService-ListDevices {
6779 description
6780 "List all physical devices controlled by the Voltha cluster";
6781 input {
6782 uses Empty;
6783
6784 }
6785 output {
6786 uses Devices;
6787
6788 }
6789 }
6790
6791 rpc VolthaGlobalService-GetDevice {
6792 description
6793 "Get more information on a given physical device";
6794 input {
6795 uses ID;
6796
6797 }
6798 output {
6799 uses Device;
6800
6801 }
6802 }
6803
6804 rpc VolthaGlobalService-CreateDevice {
6805 description
6806 "Pre-provision a new physical device";
6807 input {
6808 uses Device;
6809
6810 }
6811 output {
6812 uses Device;
6813
6814 }
6815 }
6816
6817 rpc VolthaGlobalService-EnableDevice {
6818 description
6819 "Enable a device. If the device was in pre-provisioned state then it
6820 will tansition to ENABLED state. If it was is DISABLED state then it
6821 will tansition to ENABLED state as well.";
6822 input {
6823 uses ID;
6824
6825 }
6826 output {
6827 uses Empty;
6828
6829 }
6830 }
6831
6832 rpc VolthaGlobalService-DisableDevice {
6833 description
6834 "Disable a device";
6835 input {
6836 uses ID;
6837
6838 }
6839 output {
6840 uses Empty;
6841
6842 }
6843 }
6844
6845 rpc VolthaGlobalService-RebootDevice {
6846 description
6847 "Reboot a device";
6848 input {
6849 uses ID;
6850
6851 }
6852 output {
6853 uses Empty;
6854
6855 }
6856 }
6857
6858 rpc VolthaGlobalService-DeleteDevice {
6859 description
6860 "Delete a device";
6861 input {
6862 uses ID;
6863
6864 }
6865 output {
6866 uses Empty;
6867
6868 }
6869 }
6870
6871 rpc VolthaGlobalService-ListDevicePorts {
6872 description
6873 "List ports of a device";
6874 input {
6875 uses ID;
6876
6877 }
6878 output {
6879 uses Ports;
6880
6881 }
6882 }
6883
6884 rpc VolthaGlobalService-ListDevicePmConfigs {
6885 description
6886 "List pm config of a device";
6887 input {
6888 uses ID;
6889
6890 }
6891 output {
6892 uses PmConfigs;
6893
6894 }
6895 }
6896
6897 rpc VolthaGlobalService-UpdateDevicePmConfigs {
6898 description
6899 "Update the pm config of a device";
6900 input {
6901 uses PmConfigs;
6902
6903 }
6904 output {
6905 uses Empty;
6906
6907 }
6908 }
6909
6910 rpc VolthaGlobalService-ListDeviceFlows {
6911 description
6912 "List all flows of a device";
6913 input {
6914 uses ID;
6915
6916 }
6917 output {
6918 uses Flows;
6919
6920 }
6921 }
6922
6923 rpc VolthaGlobalService-ListDeviceFlowGroups {
6924 description
6925 "List all flow groups of a device";
6926 input {
6927 uses ID;
6928
6929 }
6930 output {
6931 uses FlowGroups;
6932
6933 }
6934 }
6935
6936 rpc VolthaGlobalService-ListDeviceTypes {
6937 description
6938 "List device types known to Voltha";
6939 input {
6940 uses Empty;
6941
6942 }
6943 output {
6944 uses DeviceTypes;
6945
6946 }
6947 }
6948
6949 rpc VolthaGlobalService-GetDeviceType {
6950 description
6951 "Get additional information on a device type";
6952 input {
6953 uses ID;
6954
6955 }
6956 output {
6957 uses DeviceType;
6958
6959 }
6960 }
6961
6962 rpc VolthaGlobalService-ListDeviceGroups {
6963 description
6964 "List all device sharding groups";
6965 input {
6966 uses Empty;
6967
6968 }
6969 output {
6970 uses DeviceGroups;
6971
6972 }
6973 }
6974
6975 rpc VolthaGlobalService-GetDeviceGroup {
6976 description
6977 "Get additional information on a device group";
6978 input {
6979 uses ID;
6980
6981 }
6982 output {
6983 uses DeviceGroup;
6984
6985 }
6986 }
6987
6988 rpc VolthaGlobalService-CreateAlarmFilter {
6989 description
6990 "";
6991 input {
6992 uses AlarmFilter;
6993
6994 }
6995 output {
6996 uses AlarmFilter;
6997
6998 }
6999 }
7000
7001 rpc VolthaGlobalService-GetAlarmFilter {
7002 description
7003 "";
7004 input {
7005 uses ID;
7006
7007 }
7008 output {
7009 uses AlarmFilter;
7010
7011 }
7012 }
7013
7014 rpc VolthaGlobalService-UpdateAlarmFilter {
7015 description
7016 "";
7017 input {
7018 uses AlarmFilter;
7019
7020 }
7021 output {
7022 uses AlarmFilter;
7023
7024 }
7025 }
7026
7027 rpc VolthaGlobalService-DeleteAlarmFilter {
7028 description
7029 "";
7030 input {
7031 uses ID;
7032
7033 }
7034 output {
7035 uses Empty;
7036
7037 }
7038 }
7039
7040 rpc VolthaGlobalService-ListAlarmFilters {
7041 description
7042 "";
7043 input {
7044 uses Empty;
7045
7046 }
7047 output {
7048 uses AlarmFilters;
7049
7050 }
7051 }
7052
7053
7054 /* Per-instance APIs
7055
7056 These APIs are always served locally by the Voltha instance on which the
7057 call is made." */
7058 rpc VolthaLocalService-GetVolthaInstance {
7059 description
7060 "Get information on this Voltha instance";
7061 input {
7062 uses Empty;
7063
7064 }
7065 output {
7066 uses VolthaInstance_grouping;
7067 }
7068 }
7069
7070 rpc VolthaLocalService-GetHealth {
7071 description
7072 "Get the health state of the Voltha instance";
7073 input {
7074 uses Empty;
7075
7076 }
7077 output {
7078 uses HealthStatus;
7079
7080 }
7081 }
7082
7083 rpc VolthaLocalService-ListAdapters {
7084 description
7085 "List all active adapters (plugins) in this Voltha instance";
7086 input {
7087 uses Empty;
7088
7089 }
7090 output {
7091 uses Adapters;
7092
7093 }
7094 }
7095
7096 rpc VolthaLocalService-ListLogicalDevices {
7097 description
7098 "List all logical devices managed by this Voltha instance";
7099 input {
7100 uses Empty;
7101
7102 }
7103 output {
7104 uses LogicalDevices;
7105
7106 }
7107 }
7108
7109 rpc VolthaLocalService-GetLogicalDevice {
7110 description
7111 "Get additional information on given logical device";
7112 input {
7113 uses ID;
7114
7115 }
7116 output {
7117 uses LogicalDevice;
7118
7119 }
7120 }
7121
7122 rpc VolthaLocalService-ListLogicalDevicePorts {
7123 description
7124 "List ports of a logical device";
7125 input {
7126 uses ID;
7127
7128 }
7129 output {
7130 uses LogicalPorts;
7131
7132 }
7133 }
7134
7135 rpc VolthaLocalService-ListLogicalDeviceFlows {
7136 description
7137 "List all flows of a logical device";
7138 input {
7139 uses ID;
7140
7141 }
7142 output {
7143 uses Flows;
7144
7145 }
7146 }
7147
7148 rpc VolthaLocalService-UpdateLogicalDeviceFlowTable {
7149 description
7150 "Update flow table for logical device";
7151 input {
7152 uses FlowTableUpdate;
7153
7154 }
7155 output {
7156 uses Empty;
7157
7158 }
7159 }
7160
7161 rpc VolthaLocalService-ListLogicalDeviceFlowGroups {
7162 description
7163 "List all flow groups of a logical device";
7164 input {
7165 uses ID;
7166
7167 }
7168 output {
7169 uses FlowGroups;
7170
7171 }
7172 }
7173
7174 rpc VolthaLocalService-UpdateLogicalDeviceFlowGroupTable {
7175 description
7176 "Update group table for logical device";
7177 input {
7178 uses FlowGroupTableUpdate;
7179
7180 }
7181 output {
7182 uses Empty;
7183
7184 }
7185 }
7186
7187 rpc VolthaLocalService-ListDevices {
7188 description
7189 "List all physical devices managed by this Voltha instance";
7190 input {
7191 uses Empty;
7192
7193 }
7194 output {
7195 uses Devices;
7196
7197 }
7198 }
7199
7200 rpc VolthaLocalService-GetDevice {
7201 description
7202 "Get additional information on this device";
7203 input {
7204 uses ID;
7205
7206 }
7207 output {
7208 uses Device;
7209
7210 }
7211 }
7212
7213 rpc VolthaLocalService-CreateDevice {
7214 description
7215 "Pre-provision a new physical device";
7216 input {
7217 uses Device;
7218
7219 }
7220 output {
7221 uses Device;
7222
7223 }
7224 }
7225
7226 rpc VolthaLocalService-EnableDevice {
7227 description
7228 "Enable a device. If the device was in pre-provisioned state then it
7229 will tansition to ENABLED state. If it was is DISABLED state then it
7230 will tansition to ENABLED state as well.";
7231 input {
7232 uses ID;
7233
7234 }
7235 output {
7236 uses Empty;
7237
7238 }
7239 }
7240
7241 rpc VolthaLocalService-DisableDevice {
7242 description
7243 "Disable a device";
7244 input {
7245 uses ID;
7246
7247 }
7248 output {
7249 uses Empty;
7250
7251 }
7252 }
7253
7254 rpc VolthaLocalService-RebootDevice {
7255 description
7256 "Reboot a device";
7257 input {
7258 uses ID;
7259
7260 }
7261 output {
7262 uses Empty;
7263
7264 }
7265 }
7266
7267 rpc VolthaLocalService-DeleteDevice {
7268 description
7269 "Delete a device";
7270 input {
7271 uses ID;
7272
7273 }
7274 output {
7275 uses Empty;
7276
7277 }
7278 }
7279
7280 rpc VolthaLocalService-ListDevicePorts {
7281 description
7282 "List ports of a device";
7283 input {
7284 uses ID;
7285
7286 }
7287 output {
7288 uses Ports;
7289
7290 }
7291 }
7292
7293 rpc VolthaLocalService-ListDevicePmConfigs {
7294 description
7295 "List pm config of a device";
7296 input {
7297 uses ID;
7298
7299 }
7300 output {
7301 uses PmConfigs;
7302
7303 }
7304 }
7305
7306 rpc VolthaLocalService-UpdateDevicePmConfigs {
7307 description
7308 "Update the pm config of a device";
7309 input {
7310 uses PmConfigs;
7311
7312 }
7313 output {
7314 uses Empty;
7315
7316 }
7317 }
7318
7319 rpc VolthaLocalService-ListDeviceFlows {
7320 description
7321 "List all flows of a device";
7322 input {
7323 uses ID;
7324
7325 }
7326 output {
7327 uses Flows;
7328
7329 }
7330 }
7331
7332 rpc VolthaLocalService-ListDeviceFlowGroups {
7333 description
7334 "List all flow groups of a device";
7335 input {
7336 uses ID;
7337
7338 }
7339 output {
7340 uses FlowGroups;
7341
7342 }
7343 }
7344
7345 rpc VolthaLocalService-ListDeviceTypes {
7346 description
7347 "List device types know to Voltha instance";
7348 input {
7349 uses Empty;
7350
7351 }
7352 output {
7353 uses DeviceTypes;
7354
7355 }
7356 }
7357
7358 rpc VolthaLocalService-GetDeviceType {
7359 description
7360 "Get additional information on given device type";
7361 input {
7362 uses ID;
7363
7364 }
7365 output {
7366 uses DeviceType;
7367
7368 }
7369 }
7370
7371 rpc VolthaLocalService-ListDeviceGroups {
7372 description
7373 "List device sharding groups managed by this Voltha instance";
7374 input {
7375 uses Empty;
7376
7377 }
7378 output {
7379 uses DeviceGroups;
7380
7381 }
7382 }
7383
7384 rpc VolthaLocalService-GetDeviceGroup {
7385 description
7386 "Get more information on given device shard";
7387 input {
7388 uses ID;
7389
7390 }
7391 output {
7392 uses DeviceGroup;
7393
7394 }
7395 }
7396
7397 rpc VolthaLocalService-StreamPacketsOut {
7398 description
7399 "Stream control packets to the dataplane
7400This does not have an HTTP representation";
7401 input {
7402 uses PacketOut;
7403
7404 }
7405 output {
7406 uses Empty;
7407
7408 }
7409 }
7410
7411 rpc VolthaLocalService-ReceivePacketsIn {
7412 description
7413 "Receive control packet stream
7414This does not have an HTTP representation";
7415 input {
7416 uses Empty;
7417
7418 }
7419 output {
7420 uses PacketIn;
7421
7422 }
7423 }
7424
7425 rpc VolthaLocalService-ReceiveChangeEvents {
7426 description
7427 "This does not have an HTTP representation";
7428 input {
7429 uses Empty;
7430
7431 }
7432 output {
7433 uses ChangeEvent;
7434
7435 }
7436 }
7437
7438 rpc VolthaLocalService-CreateAlarmFilter {
7439 description
7440 "";
7441 input {
7442 uses AlarmFilter;
7443
7444 }
7445 output {
7446 uses AlarmFilter;
7447
7448 }
7449 }
7450
7451 rpc VolthaLocalService-GetAlarmFilter {
7452 description
7453 "";
7454 input {
7455 uses ID;
7456
7457 }
7458 output {
7459 uses AlarmFilter;
7460
7461 }
7462 }
7463
7464 rpc VolthaLocalService-UpdateAlarmFilter {
7465 description
7466 "";
7467 input {
7468 uses AlarmFilter;
7469
7470 }
7471 output {
7472 uses AlarmFilter;
7473
7474 }
7475 }
7476
7477 rpc VolthaLocalService-DeleteAlarmFilter {
7478 description
7479 "";
7480 input {
7481 uses ID;
7482
7483 }
7484 output {
7485 uses Empty;
7486
7487 }
7488 }
7489
7490 rpc VolthaLocalService-ListAlarmFilters {
7491 description
7492 "";
7493 input {
7494 uses Empty;
7495
7496 }
7497 output {
7498 uses AlarmFilters;
7499
7500 }
7501 }
7502
7503
7504}