dns: remove api boilerplate
[vpp.git] / src / plugins / dns / resolver_process.c
index 802da53..71e5ba2 100644 (file)
 #include <vnet/vnet.h>
 
 /* define message IDs */
-#include <dns/dns_msg_enum.h>
-
-#define vl_typedefs            /* define message structures */
-#include <dns/dns_all_api_h.h>
-#undef vl_typedefs
-
-#define vl_endianfun           /* define message structures */
-#include <dns/dns_all_api_h.h>
-#undef vl_endianfun
-
-/* instantiate all the print functions we know about */
-#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
-#define vl_printfun
-#include <dns/dns_all_api_h.h>
-#undef vl_printfun
+#include <dns/dns.api_enum.h>
+#include <dns/dns.api_types.h>
 
 #include <vlibapi/api_helper_macros.h>
 
@@ -70,7 +57,7 @@ resolve_event (dns_main_t * dm, f64 now, u8 * reply)
 
   /* $$$ u16 limits cache to 65K entries, fix later multiple dst ports */
   pool_index = clib_net_to_host_u16 (d->id);
-  dns_cache_lock (dm);
+  dns_cache_lock (dm, 10);
 
   if (pool_is_free_index (dm->entries, pool_index))
     {
@@ -306,7 +293,7 @@ retry_scan (dns_main_t * dm, f64 now)
 
   for (i = 0; i < vec_len (dm->unresolved_entries); i++)
     {
-      dns_cache_lock (dm);
+      dns_cache_lock (dm, 11);
       ep = pool_elt_at_index (dm->entries, dm->unresolved_entries[i]);
 
       ASSERT ((ep->flags & DNS_CACHE_ENTRY_FLAG_VALID) == 0);