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.

199 lines
6.4 KiB

  1. /* Automatically generated. */
  2. #include "udns.h"
  3. const struct dns_nameval dns_typetab[] = {
  4. {DNS_T_INVALID,"INVALID"},
  5. {DNS_T_A,"A"},
  6. {DNS_T_NS,"NS"},
  7. {DNS_T_MD,"MD"},
  8. {DNS_T_MF,"MF"},
  9. {DNS_T_CNAME,"CNAME"},
  10. {DNS_T_SOA,"SOA"},
  11. {DNS_T_MB,"MB"},
  12. {DNS_T_MG,"MG"},
  13. {DNS_T_MR,"MR"},
  14. {DNS_T_NULL,"NULL"},
  15. {DNS_T_WKS,"WKS"},
  16. {DNS_T_PTR,"PTR"},
  17. {DNS_T_HINFO,"HINFO"},
  18. {DNS_T_MINFO,"MINFO"},
  19. {DNS_T_MX,"MX"},
  20. {DNS_T_TXT,"TXT"},
  21. {DNS_T_RP,"RP"},
  22. {DNS_T_AFSDB,"AFSDB"},
  23. {DNS_T_X25,"X25"},
  24. {DNS_T_ISDN,"ISDN"},
  25. {DNS_T_RT,"RT"},
  26. {DNS_T_NSAP,"NSAP"},
  27. {DNS_T_NSAP_PTR,"NSAP_PTR"},
  28. {DNS_T_SIG,"SIG"},
  29. {DNS_T_KEY,"KEY"},
  30. {DNS_T_PX,"PX"},
  31. {DNS_T_GPOS,"GPOS"},
  32. {DNS_T_AAAA,"AAAA"},
  33. {DNS_T_LOC,"LOC"},
  34. {DNS_T_NXT,"NXT"},
  35. {DNS_T_EID,"EID"},
  36. {DNS_T_NIMLOC,"NIMLOC"},
  37. {DNS_T_SRV,"SRV"},
  38. {DNS_T_ATMA,"ATMA"},
  39. {DNS_T_NAPTR,"NAPTR"},
  40. {DNS_T_KX,"KX"},
  41. {DNS_T_CERT,"CERT"},
  42. {DNS_T_A6,"A6"},
  43. {DNS_T_DNAME,"DNAME"},
  44. {DNS_T_SINK,"SINK"},
  45. {DNS_T_OPT,"OPT"},
  46. {DNS_T_DS,"DS"},
  47. {DNS_T_SSHFP,"SSHFP"},
  48. {DNS_T_IPSECKEY,"IPSECKEY"},
  49. {DNS_T_RRSIG,"RRSIG"},
  50. {DNS_T_NSEC,"NSEC"},
  51. {DNS_T_DNSKEY,"DNSKEY"},
  52. {DNS_T_DHCID,"DHCID"},
  53. {DNS_T_NSEC3,"NSEC3"},
  54. {DNS_T_NSEC3PARAMS,"NSEC3PARAMS"},
  55. {DNS_T_TALINK,"TALINK"},
  56. {DNS_T_SPF,"SPF"},
  57. {DNS_T_UINFO,"UINFO"},
  58. {DNS_T_UID,"UID"},
  59. {DNS_T_GID,"GID"},
  60. {DNS_T_UNSPEC,"UNSPEC"},
  61. {DNS_T_TSIG,"TSIG"},
  62. {DNS_T_IXFR,"IXFR"},
  63. {DNS_T_AXFR,"AXFR"},
  64. {DNS_T_MAILB,"MAILB"},
  65. {DNS_T_MAILA,"MAILA"},
  66. {DNS_T_ANY,"ANY"},
  67. {DNS_T_ZXFR,"ZXFR"},
  68. {DNS_T_DLV,"DLV"},
  69. {DNS_T_MAX,"MAX"},
  70. {0,0}};
  71. const char *dns_typename(enum dns_type code) {
  72. static char nm[20];
  73. switch(code) {
  74. case DNS_T_INVALID: return dns_typetab[0].name;
  75. case DNS_T_A: return dns_typetab[1].name;
  76. case DNS_T_NS: return dns_typetab[2].name;
  77. case DNS_T_MD: return dns_typetab[3].name;
  78. case DNS_T_MF: return dns_typetab[4].name;
  79. case DNS_T_CNAME: return dns_typetab[5].name;
  80. case DNS_T_SOA: return dns_typetab[6].name;
  81. case DNS_T_MB: return dns_typetab[7].name;
  82. case DNS_T_MG: return dns_typetab[8].name;
  83. case DNS_T_MR: return dns_typetab[9].name;
  84. case DNS_T_NULL: return dns_typetab[10].name;
  85. case DNS_T_WKS: return dns_typetab[11].name;
  86. case DNS_T_PTR: return dns_typetab[12].name;
  87. case DNS_T_HINFO: return dns_typetab[13].name;
  88. case DNS_T_MINFO: return dns_typetab[14].name;
  89. case DNS_T_MX: return dns_typetab[15].name;
  90. case DNS_T_TXT: return dns_typetab[16].name;
  91. case DNS_T_RP: return dns_typetab[17].name;
  92. case DNS_T_AFSDB: return dns_typetab[18].name;
  93. case DNS_T_X25: return dns_typetab[19].name;
  94. case DNS_T_ISDN: return dns_typetab[20].name;
  95. case DNS_T_RT: return dns_typetab[21].name;
  96. case DNS_T_NSAP: return dns_typetab[22].name;
  97. case DNS_T_NSAP_PTR: return dns_typetab[23].name;
  98. case DNS_T_SIG: return dns_typetab[24].name;
  99. case DNS_T_KEY: return dns_typetab[25].name;
  100. case DNS_T_PX: return dns_typetab[26].name;
  101. case DNS_T_GPOS: return dns_typetab[27].name;
  102. case DNS_T_AAAA: return dns_typetab[28].name;
  103. case DNS_T_LOC: return dns_typetab[29].name;
  104. case DNS_T_NXT: return dns_typetab[30].name;
  105. case DNS_T_EID: return dns_typetab[31].name;
  106. case DNS_T_NIMLOC: return dns_typetab[32].name;
  107. case DNS_T_SRV: return dns_typetab[33].name;
  108. case DNS_T_ATMA: return dns_typetab[34].name;
  109. case DNS_T_NAPTR: return dns_typetab[35].name;
  110. case DNS_T_KX: return dns_typetab[36].name;
  111. case DNS_T_CERT: return dns_typetab[37].name;
  112. case DNS_T_A6: return dns_typetab[38].name;
  113. case DNS_T_DNAME: return dns_typetab[39].name;
  114. case DNS_T_SINK: return dns_typetab[40].name;
  115. case DNS_T_OPT: return dns_typetab[41].name;
  116. case DNS_T_DS: return dns_typetab[42].name;
  117. case DNS_T_SSHFP: return dns_typetab[43].name;
  118. case DNS_T_IPSECKEY: return dns_typetab[44].name;
  119. case DNS_T_RRSIG: return dns_typetab[45].name;
  120. case DNS_T_NSEC: return dns_typetab[46].name;
  121. case DNS_T_DNSKEY: return dns_typetab[47].name;
  122. case DNS_T_DHCID: return dns_typetab[48].name;
  123. case DNS_T_NSEC3: return dns_typetab[49].name;
  124. case DNS_T_NSEC3PARAMS: return dns_typetab[50].name;
  125. case DNS_T_TALINK: return dns_typetab[51].name;
  126. case DNS_T_SPF: return dns_typetab[52].name;
  127. case DNS_T_UINFO: return dns_typetab[53].name;
  128. case DNS_T_UID: return dns_typetab[54].name;
  129. case DNS_T_GID: return dns_typetab[55].name;
  130. case DNS_T_UNSPEC: return dns_typetab[56].name;
  131. case DNS_T_TSIG: return dns_typetab[57].name;
  132. case DNS_T_IXFR: return dns_typetab[58].name;
  133. case DNS_T_AXFR: return dns_typetab[59].name;
  134. case DNS_T_MAILB: return dns_typetab[60].name;
  135. case DNS_T_MAILA: return dns_typetab[61].name;
  136. case DNS_T_ANY: return dns_typetab[62].name;
  137. case DNS_T_ZXFR: return dns_typetab[63].name;
  138. case DNS_T_DLV: return dns_typetab[64].name;
  139. case DNS_T_MAX: return dns_typetab[65].name;
  140. }
  141. return _dns_format_code(nm,"type",code);
  142. }
  143. const struct dns_nameval dns_classtab[] = {
  144. {DNS_C_INVALID,"INVALID"},
  145. {DNS_C_IN,"IN"},
  146. {DNS_C_CH,"CH"},
  147. {DNS_C_HS,"HS"},
  148. {DNS_C_ANY,"ANY"},
  149. {0,0}};
  150. const char *dns_classname(enum dns_class code) {
  151. static char nm[20];
  152. switch(code) {
  153. case DNS_C_INVALID: return dns_classtab[0].name;
  154. case DNS_C_IN: return dns_classtab[1].name;
  155. case DNS_C_CH: return dns_classtab[2].name;
  156. case DNS_C_HS: return dns_classtab[3].name;
  157. case DNS_C_ANY: return dns_classtab[4].name;
  158. }
  159. return _dns_format_code(nm,"class",code);
  160. }
  161. const struct dns_nameval dns_rcodetab[] = {
  162. {DNS_R_NOERROR,"NOERROR"},
  163. {DNS_R_FORMERR,"FORMERR"},
  164. {DNS_R_SERVFAIL,"SERVFAIL"},
  165. {DNS_R_NXDOMAIN,"NXDOMAIN"},
  166. {DNS_R_NOTIMPL,"NOTIMPL"},
  167. {DNS_R_REFUSED,"REFUSED"},
  168. {DNS_R_YXDOMAIN,"YXDOMAIN"},
  169. {DNS_R_YXRRSET,"YXRRSET"},
  170. {DNS_R_NXRRSET,"NXRRSET"},
  171. {DNS_R_NOTAUTH,"NOTAUTH"},
  172. {DNS_R_NOTZONE,"NOTZONE"},
  173. {DNS_R_BADSIG,"BADSIG"},
  174. {DNS_R_BADKEY,"BADKEY"},
  175. {DNS_R_BADTIME,"BADTIME"},
  176. {0,0}};
  177. const char *dns_rcodename(enum dns_rcode code) {
  178. static char nm[20];
  179. switch(code) {
  180. case DNS_R_NOERROR: return dns_rcodetab[0].name;
  181. case DNS_R_FORMERR: return dns_rcodetab[1].name;
  182. case DNS_R_SERVFAIL: return dns_rcodetab[2].name;
  183. case DNS_R_NXDOMAIN: return dns_rcodetab[3].name;
  184. case DNS_R_NOTIMPL: return dns_rcodetab[4].name;
  185. case DNS_R_REFUSED: return dns_rcodetab[5].name;
  186. case DNS_R_YXDOMAIN: return dns_rcodetab[6].name;
  187. case DNS_R_YXRRSET: return dns_rcodetab[7].name;
  188. case DNS_R_NXRRSET: return dns_rcodetab[8].name;
  189. case DNS_R_NOTAUTH: return dns_rcodetab[9].name;
  190. case DNS_R_NOTZONE: return dns_rcodetab[10].name;
  191. case DNS_R_BADSIG: return dns_rcodetab[11].name;
  192. case DNS_R_BADKEY: return dns_rcodetab[12].name;
  193. case DNS_R_BADTIME: return dns_rcodetab[13].name;
  194. }
  195. return _dns_format_code(nm,"rcode",code);
  196. }