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.

err_errno.c 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**************************************
  2. * AUTHOR: Federico Tomassini *
  3. * Copyright (C) Federico Tomassini *
  4. * Contact effetom@gmail.com *
  5. ***********************************************
  6. ***** ******
  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. #include "err_errno.h"
  21. static const char *err_strings[] = {
  22. "UFO error -o-", /* ERR_UFOERR */
  23. "Malformed Label Octet.", /* ERR_DNSMLO */
  24. "Malformed Sequence Label.", /* ERR_DNSMSL */
  25. "Malformed Dns Packet.", /* ERR_DNSMDP */
  26. "Malformed Dns Data.", /* ERR_DNSMDD */
  27. "Too many Recursive Pointers.", /* ERR_DNSTRP */
  28. "Dns Packet Len Break.", /* ERR_DNSPLB */
  29. "Pointer To Pointer error.", /* ERR_DNSPTP */
  30. "Malformed Data.", /* ERR_DNSMDA */
  31. "Error Packing Dns Struct.", /* ERR_DNSPDS */
  32. /**/ "Malformed Andna Packet.", /* ERR_ANDMAP */
  33. "Andns Packet Len Break.", /* ERR_ANDPLB */
  34. "Malformed Andns Data.", /* ERR_ANDMAD */
  35. "Andna Not Compatbile Query.", /* ERR_ANDNCQ */
  36. /**/ "Error reading resolv.conf.", /* ERR_RSLERC */
  37. "Andns init error.", /* ERR_RSLAIE */
  38. "There isn't No NameServer.", /* ERR_RSLNNS */
  39. "Error Forwarding DNS Query.", /* ERR_RSLFDQ */
  40. "Resolution Error.", /* ERR_RSLRSL */
  41. "Andns Query Discarded.", /* ERR_RSLAQD */
  42. /**/ "mark_init error!.", /* ERR_NETINI */
  43. "netfilter table not loadable.", /* ERR_NETFIL */
  44. "error adding netfilter rules.", /* ERR_NETRUL */
  45. "error committing netfilter rules.", /* ERR_NETCOM */
  46. "error initializing ntk_mark_chain.", /* ERR_NETCHA */
  47. "netfilter delete error.", /* ERR_NETDEL */
  48. "error storing rules.", /* ERR_NETSTO */
  49. "Nefilter was not restored.", /* ERR_NETRST */
  50. /**/ "SNSD main record not found.", /* ERR_SNDMRF */
  51. "SNSD recursion failed.", /* ERR_SNDRCS */
  52. /**/ "Zlib Compression Fail.", /* ERR_ZLIBCP */
  53. "Zlib Uncompression Fail.", /* ERR_ZLIBUP */
  54. "Zlib compression is useless.", /* ERR_ZLIBNU */
  55. };
  56. const char *
  57. __err_strerror(int n)
  58. {
  59. int __n = -((n) + 1);
  60. return (__n >= ERR_NERR || __n < 0) ? ERR_OVERFLOW : err_strings[__n];
  61. }