-static bool (*request_handlers[])(connection_t *, const char *) = {
- id_h, metakey_h, challenge_h, chal_reply_h, ack_h,
- status_h, error_h, termreq_h,
- ping_h, pong_h,
- NULL, NULL, //add_subnet_h, del_subnet_h,
- add_edge_h, del_edge_h,
- key_changed_h, req_key_h, ans_key_h, tcppacket_h, NULL, //control_h,
+static bool (*request_handlers[NUM_REQUESTS])(meshlink_handle_t *, connection_t *, const char *) = {
+ [ID] = id_h,
+ [ACK] = ack_h,
+ [STATUS] = status_h,
+ [ERROR] = error_h,
+ [TERMREQ] = termreq_h,
+ [PING] = ping_h,
+ [PONG] = pong_h,
+ [ADD_EDGE] = add_edge_h,
+ [DEL_EDGE] = del_edge_h,
+ [KEY_CHANGED] = key_changed_h,
+ [REQ_KEY] = req_key_h,
+ [ANS_KEY] = ans_key_h,