+/* declare hooks for the basic API, so that it can be specialized or served
+ * externally. Also declare a hook when those functions have been registered,
+ * so that any external module wanting to replace those can react
+ */
+
+DECLARE_HOOK(lm_client_connect,
+ (uint8_t proto, uint16_t instance, vrf_id_t vrf_id),
+ (proto, instance, vrf_id));
+DECLARE_HOOK(lm_client_disconnect, (uint8_t proto, uint16_t instance),
+ (proto, instance));
+DECLARE_HOOK(lm_get_chunk,
+ (struct label_manager_chunk * *lmc, uint8_t proto,
+ uint16_t instance, uint8_t keep, uint32_t size, uint32_t base,
+ vrf_id_t vrf_id),
+ (lmc, proto, instance, keep, size, base, vrf_id));
+DECLARE_HOOK(lm_release_chunk,
+ (uint8_t proto, uint16_t instance, uint32_t start, uint32_t end),
+ (proto, instance, start, end));
+DECLARE_HOOK(lm_cbs_inited, (), ());
+
+
+/* declare wrappers to be called in zapi_msg.c (as hooks must be called in
+ * source file where they were defined)
+ */
+void lm_client_connect_call(uint8_t proto, uint16_t instance, vrf_id_t vrf_id);
+void lm_get_chunk_call(struct label_manager_chunk **lmc, uint8_t proto,
+ uint16_t instance, uint8_t keep, uint32_t size,
+ uint32_t base, vrf_id_t vrf_id);
+void lm_release_chunk_call(uint8_t proto, uint16_t instance, uint32_t start,
+ uint32_t end);
+
+/* API for an external LM to return responses for requests */
+int lm_client_connect_response(uint8_t proto, uint16_t instance,
+ vrf_id_t vrf_id, uint8_t result);
+int lm_get_chunk_response(struct label_manager_chunk *lmc, uint8_t proto,
+ uint16_t instance, vrf_id_t vrf_id);
+
+/* convenience function to allocate an lmc to be consumed by the above API */
+struct label_manager_chunk *create_label_chunk(uint8_t proto,
+ unsigned short instance,
+ uint8_t keep, uint32_t start,
+ uint32_t end);
+void delete_label_chunk(void *val);
+
+/* register/unregister callbacks for hooks */
+void lm_hooks_register(void);
+void lm_hooks_unregister(void);
+