Marc De Leenheer | 1b62eb8 | 2017-05-19 15:53:36 -0700 | [diff] [blame] | 1 | /* This file input supports FlowForwarding LINC-OE optical switch. */ |
| 2 | |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 3 | #version 4 |
| 4 | |
| 5 | /* WDM grid types */ |
| 6 | enum ofp_grid_type { |
| 7 | OFPGRIDT_RES = 0, |
| 8 | OFPGRIDT_DWDM = 1, |
| 9 | OFPGRIDT_CWDM = 2, |
| 10 | OFPGRIDT_FLEX = 3, |
| 11 | }; |
| 12 | |
| 13 | /* WDM grid channel spacing */ |
| 14 | enum ofp_channel_spacing { |
| 15 | OFPCS_RES = 0, |
| 16 | OFPCS_GHZ_100 = 1, |
| 17 | OFPCS_GHZ_50 = 2, |
| 18 | OFPCS_GHZ_24 = 3, |
| 19 | OFPCS_GHZ_12P5 = 4, /* 12.5 GHZ */ |
| 20 | OFPCS_GHZ_6P25 = 5, /* 6.25 GHZ */ |
| 21 | }; |
| 22 | |
| 23 | /* Layer classes (families) supported for optical transport port. */ |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 24 | enum ofp_port_optical_transport_layer_class(wire_type=uint8_t){ |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 25 | OFPPOTL_PORT = 1, /* Class of base port layer signal types */ |
| 26 | OFPPOTL_OCH = 2, /* Class of OCH layer signal types*/ |
| 27 | OFPPOTL_ODU = 3, /* Class of ODU layer signal types*/ |
| 28 | OFPPOTL_ODUCLT = 4, /* Class of ODU client layer signal types*/ |
| 29 | }; |
| 30 | |
| 31 | /* Base port layer signal types */ |
| 32 | enum ofp_otport_signal_type { |
| 33 | OFPOTPT_OTSn = 1, |
| 34 | OFPOTPT_OMSn = 2, |
| 35 | OFPOTPT_OPSn = 3, |
| 36 | OFPOTPT_OPSM = 4, |
| 37 | OFPOTPT_OCH = 5, |
| 38 | OFPOTPT_OTU1 = 11, |
| 39 | OFPOTPT_OTU2 = 12, |
| 40 | OFPOTPT_OTU3 = 13, |
| 41 | OFPOTPT_OTU4 = 14, |
| 42 | }; |
| 43 | |
| 44 | /* OCH layer signal types */ |
| 45 | enum ofp_och_signal_type { |
| 46 | OFPOCHT_FIX_GRID = 1, |
| 47 | OFPOCHT_FLEX_GRID = 2, |
| 48 | }; |
| 49 | |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 50 | // Not used .. just for info on structure. |
| 51 | struct ofp_och_signal_id { |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 52 | uint8_t grid; //Type of WDM grid - OFPGRIDT_* |
| 53 | uint8_t cs; //Channel Spacing - OFPCS_* |
| 54 | uint16_t n; // Used to calculate frequency as in [ITU G.694.1] |
| 55 | // Frequency(THz)= 193.1 THz + n * chan_spacing |
| 56 | uint16_t m; // Used to calculate spectral width [ITU G.694.1] |
| 57 | // Spectral Width (GHz) = m * 12.5 |
| 58 | // For fix grid networks, m=1 |
| 59 | }; |
| 60 | |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 61 | struct of_oxm_och_sigtype : of_oxm { |
Marc De Leenheer | 1b62eb8 | 2017-05-19 15:53:36 -0700 | [diff] [blame] | 62 | uint32_t type_len == 0x80005801; |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 63 | uint8_t value; |
| 64 | }; |
| 65 | |
| 66 | struct of_oxm_och_sigid : of_oxm { |
Marc De Leenheer | 1b62eb8 | 2017-05-19 15:53:36 -0700 | [diff] [blame] | 67 | uint32_t type_len == 0x80005A06; |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 68 | of_sig_id_t value; |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 69 | }; |
| 70 | |
| 71 | |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 72 | struct of_action_circuit : of_action_experimenter { |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 73 | uint16_t type == 65535; |
| 74 | uint16_t len; |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 75 | uint32_t experimenter == 0x748771; |
| 76 | uint16_t subtype == 25; |
| 77 | uint16_t hlength == 16; // fix length of OXM field |
| 78 | of_oxm_t field; |
| 79 | pad(2); |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 80 | }; |
| 81 | |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 82 | |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 83 | struct of_circuit_ports_request : of_experimenter_stats_request { |
| 84 | uint8_t version; |
| 85 | uint8_t type == 18; |
| 86 | uint16_t length; |
| 87 | uint32_t xid; |
| 88 | uint16_t stats_type == 0xffff; |
| 89 | enum ofp_stats_request_flags flags; |
| 90 | pad(4); |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 91 | uint32_t experimenter == 0x748771; |
| 92 | uint32_t subtype == 13; |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 93 | }; |
| 94 | |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 95 | |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 96 | struct of_circuit_ports_reply : of_experimenter_stats_reply { |
| 97 | uint8_t version; |
| 98 | uint8_t type == 19; |
| 99 | uint16_t length; |
| 100 | uint32_t xid; |
| 101 | uint16_t stats_type == 0xffff; |
| 102 | enum ofp_stats_reply_flags flags; |
| 103 | pad(4); |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 104 | uint32_t experimenter == 0x748771; |
| 105 | uint32_t subtype == 13; |
| 106 | list(of_port_optical_t) entries; |
Praseed Balakrishnan | f78068b | 2014-09-04 10:30:40 -0700 | [diff] [blame] | 107 | }; |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 108 | |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 109 | struct of_port_optical { |
| 110 | of_port_no_t port_no; |
| 111 | uint16_t length; |
| 112 | pad(2); |
| 113 | of_mac_addr_t hw_addr; |
| 114 | pad(2); |
| 115 | of_port_name_t name; |
| 116 | enum ofp_port_config config; |
| 117 | enum ofp_port_state state; |
| 118 | list(of_port_desc_prop_optical_transport_t) desc; |
| 119 | }; |
| 120 | |
| 121 | struct of_port_desc_prop_optical_transport { |
| 122 | uint16_t type; |
| 123 | uint16_t length; |
| 124 | uint8_t port_signal_type; |
| 125 | uint8_t reserved; |
Praseed Balakrishnan | db949d4 | 2014-12-02 14:28:20 -0800 | [diff] [blame] | 126 | pad(1); |
| 127 | uint8_t port_type; |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 128 | }; |
| 129 | |
Praseed Balakrishnan | db949d4 | 2014-12-02 14:28:20 -0800 | [diff] [blame] | 130 | struct of_circuit_port_status : of_experimenter { |
| 131 | uint8_t version; |
| 132 | uint8_t type == 4; |
| 133 | uint16_t length; |
| 134 | uint32_t xid; |
| 135 | uint32_t experimenter == 0x748771; |
| 136 | uint32_t exp_type == 12; |
| 137 | enum ofp_port_reason reason; |
| 138 | pad(7); |
| 139 | of_port_no_t port_no; |
| 140 | uint16_t lengths; |
| 141 | pad(2); |
| 142 | of_mac_addr_t hw_addr; |
| 143 | pad(2); |
| 144 | of_port_name_t name; |
| 145 | enum ofp_port_config config; |
| 146 | enum ofp_port_state state; |
| 147 | uint64_t ignore; |
| 148 | }; |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 153 | struct of_port_optical_transport_application_code |
| 154 | { |
| 155 | uint16_t feature_type; |
| 156 | uint8_t oic_type; |
| 157 | of_app_code_t app_code; |
| 158 | }; |
| 159 | |
| 160 | |
| 161 | struct of_port_optical_transport_layer_entry { |
| 162 | uint8_t layer_class; |
| 163 | uint8_t signal_type; |
| 164 | uint8_t adaptation; |
| 165 | pad(5); |
| 166 | }; |
| 167 | |
| 168 | |
| 169 | /* ODU Layer Stack Feature Encoding */ |
| 170 | struct of_port_optical_transport_layer_stack { |
| 171 | uint16_t feature_type; |
| 172 | uint16_t length; |
| 173 | pad(4); |
| 174 | list(of_port_optical_transport_layer_entry_t) entries; |
| 175 | }; |
| 176 | |