You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

andns_snsd.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**************************************
  2. * AUTHOR: Federico Tomassini *
  3. * Copyright (C) Federico Tomassini *
  4. * Contact effetom@gmail.com *
  5. ***********************************************
  6. ******* BEGIN 4/2006 ********
  7. *************************************************************************
  8. * *
  9. * This program is free software; you can redistribute it and/or modify *
  10. * it under the terms of the GNU General Public License as published by *
  11. * the Free Software Foundation; either version 2 of the License, or *
  12. * (at your option) any later version. *
  13. * *
  14. * This program is distributed in the hope that it will be useful, *
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  17. * GNU General Public License for more details. *
  18. * *
  19. ************************************************************************/
  20. #ifndef ANDNS_SNSD_H
  21. #define ANDNS_SNSD_H
  22. #include "dnslib.h"
  23. #include "andns_lib.h"
  24. #include "andna_cache.h"
  25. #define ANDNS_SNSD_PROTO_TCP 1
  26. #define ANDNS_SNSD_PROTO_UDP 2
  27. /* functions */
  28. int snsd_main_ip(u_int * hname_hash, snsd_node * dst);
  29. int snsd_node_to_data(char *buf, snsd_node * sn, u_char prio, int iplen,
  30. int recursion);
  31. size_t snsd_node_to_aansw(char *buf, snsd_node * sn, u_char prio,
  32. int iplen);
  33. int snsd_prio_to_aansws(char *buf, snsd_prio * sp, int iplen,
  34. int recursion, int *count);
  35. int snsd_service_to_aansws(char *buf, snsd_service * ss, int iplen,
  36. int *count, int recursion);
  37. int snsd_node_to_dansw(dns_pkt * dp, snsd_node * sn, int iplen);
  38. int snsd_prio_to_dansws(dns_pkt * dp, snsd_prio * sp, int iplen);
  39. int lcl_cache_to_dansws(dns_pkt * dp, lcl_cache * lc);
  40. size_t lcl_cache_to_aansws(char *buf, lcl_cache * lc, int *count);
  41. #endif /* ANDNS_SNSD_H */