|
|
|
@ -81,68 +81,3 @@ void DNSAppLayerRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto)
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DNSCreateRcodeString(uint8_t rcode, char *str, size_t str_size)
|
|
|
|
|
{
|
|
|
|
|
switch (rcode) {
|
|
|
|
|
case DNS_RCODE_NOERROR:
|
|
|
|
|
snprintf(str, str_size, "NOERROR");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_FORMERR:
|
|
|
|
|
snprintf(str, str_size, "FORMERR");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_SERVFAIL:
|
|
|
|
|
snprintf(str, str_size, "SERVFAIL");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_NXDOMAIN:
|
|
|
|
|
snprintf(str, str_size, "NXDOMAIN");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_NOTIMP:
|
|
|
|
|
snprintf(str, str_size, "NOTIMP");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_REFUSED:
|
|
|
|
|
snprintf(str, str_size, "REFUSED");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_YXDOMAIN:
|
|
|
|
|
snprintf(str, str_size, "YXDOMAIN");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_YXRRSET:
|
|
|
|
|
snprintf(str, str_size, "YXRRSET");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_NXRRSET:
|
|
|
|
|
snprintf(str, str_size, "NXRRSET");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_NOTAUTH:
|
|
|
|
|
snprintf(str, str_size, "NOTAUTH");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_NOTZONE:
|
|
|
|
|
snprintf(str, str_size, "NOTZONE");
|
|
|
|
|
break;
|
|
|
|
|
/* these are the same, need more logic */
|
|
|
|
|
case DNS_RCODE_BADVERS:
|
|
|
|
|
//case DNS_RCODE_BADSIG:
|
|
|
|
|
snprintf(str, str_size, "BADVERS/BADSIG");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADKEY:
|
|
|
|
|
snprintf(str, str_size, "BADKEY");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADTIME:
|
|
|
|
|
snprintf(str, str_size, "BADTIME");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADMODE:
|
|
|
|
|
snprintf(str, str_size, "BADMODE");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADNAME:
|
|
|
|
|
snprintf(str, str_size, "BADNAME");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADALG:
|
|
|
|
|
snprintf(str, str_size, "BADALG");
|
|
|
|
|
break;
|
|
|
|
|
case DNS_RCODE_BADTRUNC:
|
|
|
|
|
snprintf(str, str_size, "BADTRUNC");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
SCLogDebug("could not map DNS rcode to name, bug!");
|
|
|
|
|
snprintf(str, str_size, "%04x/%u", rcode, rcode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|