1 const char * wdns_opcode_to_str(uint16_t opcode)2wdns_opcode_to_str(uint16_t opcode) 3 { 4 switch (opcode) { 5 case WDNS_OP_QUERY: return ("QUERY"); 6 case WDNS_OP_IQUERY: return ("IQUERY"); 7 case WDNS_OP_STATUS: return ("STATUS"); 8 case WDNS_OP_NOTIFY: return ("NOTIFY"); 9 case WDNS_OP_UPDATE: return ("UPDATE"); 10 } 11 12 return (NULL); 13 } 14