serverfailed (const char *buf, unsigned int len)
{
    char out[12];
    unsigned int rcode = 0;

    if (!dns_packet_copy (buf, len, 0, out, 12))
        return 1;

    rcode = out[3];
    rcode &= 15;
    if (rcode && (rcode != 3))
    {
        errno = error_again;
        return 1;
    }

    return 0;
}
serverfailed (const char *buf, unsigned int len)
{
    char out[12];
    unsigned int rcode = 0;

    if (!dns_packet_copy (buf, len, 0, out, 12))
        return 1;

    rcode = out[3];
    rcode &= 15;
    if (rcode && (rcode != 3))
    {
        errno = error_again;
        return 1;
    }

    return 0;
}