Source
/* #if defined(HAVE_RES_NINIT) && !defined(_AIX) && (defined(HAVE_RES_U_EXT) || defined(HAVE_RES_U_EXT_EXT)) */
/*
** Zabbix
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/* 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: