summaryrefslogtreecommitdiffstats
path: root/src/resolve/dns_type-to-name.awk
blob: badb1824b5a38608a586c17cff1c0f796220c69b (plain)
1
2
3
4
5
6
7
8
9
10
11
BEGIN{
        print "const char *dns_type_to_string(int type) {\n\tswitch(type) {"
}
{
        printf "        case DNS_TYPE_%s: return ", $1;
        sub(/_/, "-");
        printf "\"%s\";\n", $1
}
END{
        print "        default: return NULL;\n\t}\n}\n"
}