Source
/* #if defined(HAVE_RES_NINIT) && !defined(_AIX) && (defined(HAVE_RES_U_EXT) || defined(HAVE_RES_U_EXT_EXT)) */
/*
** Copyright (C) 2001-2024 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/* add the library for DnsQuery function */
static const char *decode_type(int q_type)
{
static ZBX_THREAD_LOCAL char buf[16];
switch (q_type)
{
case T_A:
return "A"; /* address */
case T_AAAA:
return "AAAA"; /* v6 address */
case T_NS:
return "NS"; /* name server */
case T_MD:
return "MD"; /* mail destination */ /* obsolete */
case T_MF:
return "MF"; /* mail forwarder */ /* obsolete */
case T_CNAME:
return "CNAME"; /* canonical name */
case T_SOA:
return "SOA"; /* start of authority */
case T_MB:
return "MB"; /* mailbox */ /* experimental */
case T_MG:
return "MG"; /* mail group member */ /* experimental */
case T_MR:
return "MR"; /* mail rename */ /* experimental */
case T_NULL:
return "NULL"; /* null */ /* obsolete */
case T_WKS:
return "WKS"; /* well-known service */ /* obsolete */
case T_PTR:
return "PTR"; /* domain name pointer */