@@ -119,6 +119,11 @@ DBusIPCAPI_v1::init_callback_tables()
119
119
INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_PEEK, interface_peek_handler);
120
120
INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_POKE, interface_poke_handler);
121
121
122
+ INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_LINK_METRICS_QUERY, interface_link_metrics_query_handler);
123
+ INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_LINK_METRICS_PROBE, interface_link_metrics_probe_handler);
124
+ INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_LINK_METRICS_MGMT_FORWARD, interface_link_metrics_mgmt_forward_handler);
125
+ INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_LINK_METRICS_MGMT_ENH_ACK, interface_link_metrics_mgmt_enh_ack_handler);
126
+
122
127
INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_MLR_REQUEST, interface_mlr_request_handler);
123
128
124
129
INTERFACE_CALLBACK_CONNECT (WPANTUND_IF_CMD_BACKBONE_ROUTER_CONFIG, interface_backbone_router_config_handler);
@@ -2120,6 +2125,173 @@ DBusIPCAPI_v1::interface_poke_handler(
2120
2125
return ret;
2121
2126
}
2122
2127
2128
+ DBusHandlerResult
2129
+ DBusIPCAPI_v1::interface_link_metrics_query_handler (
2130
+ NCPControlInterface* interface,
2131
+ DBusMessage * message
2132
+ ) {
2133
+ DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
2134
+ const uint8_t *dest_addr = NULL ;
2135
+ int dest_addr_len;
2136
+ struct in6_addr dest;
2137
+ uint8_t series;
2138
+ uint8_t metrics = 0 ;
2139
+ bool did_succeed = false ;
2140
+
2141
+ did_succeed = dbus_message_get_args (
2142
+ message, NULL ,
2143
+ DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &dest_addr, &dest_addr_len,
2144
+ DBUS_TYPE_BYTE, &series,
2145
+ DBUS_TYPE_BYTE, &metrics,
2146
+ DBUS_TYPE_INVALID
2147
+ );
2148
+
2149
+ require (did_succeed, bail);
2150
+ require (dest_addr_len == sizeof (dest), bail);
2151
+
2152
+ dbus_message_ref (message);
2153
+
2154
+ memcpy (dest.s6_addr , dest_addr, sizeof (dest));
2155
+
2156
+ interface->link_metrics_query (
2157
+ dest,
2158
+ series,
2159
+ metrics,
2160
+ boost::bind (&DBusIPCAPI_v1::CallbackWithStatus_Helper, this , _1, message)
2161
+ );
2162
+
2163
+ ret = DBUS_HANDLER_RESULT_HANDLED;
2164
+
2165
+ bail:
2166
+ return ret;
2167
+ }
2168
+
2169
+ DBusHandlerResult
2170
+ DBusIPCAPI_v1::interface_link_metrics_probe_handler (
2171
+ NCPControlInterface* interface,
2172
+ DBusMessage * message
2173
+ ) {
2174
+ DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
2175
+ const uint8_t *dest_addr = NULL ;
2176
+ int dest_addr_len;
2177
+ struct in6_addr dest;
2178
+ uint8_t series;
2179
+ uint8_t length;
2180
+ bool did_succeed = false ;
2181
+
2182
+ did_succeed = dbus_message_get_args (
2183
+ message, NULL ,
2184
+ DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &dest_addr, &dest_addr_len,
2185
+ DBUS_TYPE_BYTE, &series,
2186
+ DBUS_TYPE_BYTE, &length,
2187
+ DBUS_TYPE_INVALID
2188
+ );
2189
+
2190
+ require (did_succeed, bail);
2191
+ require (dest_addr_len == sizeof (dest), bail);
2192
+
2193
+ dbus_message_ref (message);
2194
+
2195
+ memcpy (dest.s6_addr , dest_addr, sizeof (dest));
2196
+
2197
+ interface->link_metrics_probe (
2198
+ dest,
2199
+ series,
2200
+ length,
2201
+ boost::bind (&DBusIPCAPI_v1::CallbackWithStatus_Helper, this , _1, message)
2202
+ );
2203
+
2204
+ ret = DBUS_HANDLER_RESULT_HANDLED;
2205
+
2206
+ bail:
2207
+ return ret;
2208
+ }
2209
+
2210
+ DBusHandlerResult
2211
+ DBusIPCAPI_v1::interface_link_metrics_mgmt_forward_handler (
2212
+ NCPControlInterface* interface,
2213
+ DBusMessage * message
2214
+ ) {
2215
+ DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
2216
+ const uint8_t *dest_addr = NULL ;
2217
+ int dest_addr_len;
2218
+ struct in6_addr dest;
2219
+ uint8_t series_id = 0 ;
2220
+ uint8_t metrics = 0 ;
2221
+ uint8_t frame_types = 0 ;
2222
+ bool did_succeed = false ;
2223
+
2224
+ did_succeed = dbus_message_get_args (
2225
+ message, NULL ,
2226
+ DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &dest_addr, &dest_addr_len,
2227
+ DBUS_TYPE_BYTE, &series_id,
2228
+ DBUS_TYPE_BYTE, &frame_types,
2229
+ DBUS_TYPE_BYTE, &metrics,
2230
+ DBUS_TYPE_INVALID
2231
+ );
2232
+
2233
+ require (did_succeed, bail);
2234
+ require (dest_addr_len == sizeof (dest), bail);
2235
+
2236
+ dbus_message_ref (message);
2237
+
2238
+ memcpy (dest.s6_addr , dest_addr, sizeof (dest));
2239
+
2240
+ interface->link_metrics_mgmt_forward (
2241
+ dest,
2242
+ series_id,
2243
+ frame_types,
2244
+ metrics,
2245
+ boost::bind (&DBusIPCAPI_v1::CallbackWithStatus_Helper, this , _1, message)
2246
+ );
2247
+
2248
+ ret = DBUS_HANDLER_RESULT_HANDLED;
2249
+
2250
+ bail:
2251
+ return ret;
2252
+ }
2253
+
2254
+ DBusHandlerResult
2255
+ DBusIPCAPI_v1::interface_link_metrics_mgmt_enh_ack_handler (
2256
+ NCPControlInterface* interface,
2257
+ DBusMessage * message
2258
+ ) {
2259
+ DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
2260
+ const uint8_t *dest_addr = NULL ;
2261
+ int dest_addr_len;
2262
+ struct in6_addr dest;
2263
+ uint8_t metrics = 0 ;
2264
+ uint8_t flags = 0 ;
2265
+ bool did_succeed = false ;
2266
+
2267
+ did_succeed = dbus_message_get_args (
2268
+ message, NULL ,
2269
+ DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &dest_addr, &dest_addr_len,
2270
+ DBUS_TYPE_BYTE, &flags,
2271
+ DBUS_TYPE_BYTE, &metrics,
2272
+ DBUS_TYPE_INVALID
2273
+ );
2274
+
2275
+ require (did_succeed, bail);
2276
+ require (dest_addr_len == sizeof (dest), bail);
2277
+
2278
+ dbus_message_ref (message);
2279
+
2280
+ memcpy (dest.s6_addr , dest_addr, sizeof (dest));
2281
+
2282
+ interface->link_metrics_mgmt_enh_ack (
2283
+ dest,
2284
+ flags,
2285
+ metrics,
2286
+ boost::bind (&DBusIPCAPI_v1::CallbackWithStatus_Helper, this , _1, message)
2287
+ );
2288
+
2289
+ ret = DBUS_HANDLER_RESULT_HANDLED;
2290
+
2291
+ bail:
2292
+ return ret;
2293
+ }
2294
+
2123
2295
DBusHandlerResult
2124
2296
DBusIPCAPI_v1::interface_mlr_request_handler (
2125
2297
NCPControlInterface* interface,
0 commit comments