forked from osmocom/wireshark
Clean up what's displayed for unknown opcodes and unknown rcodes.
svn path=/trunk/; revision=160
This commit is contained in:
parent
bc21c7a2c7
commit
464949dc2a
|
@ -1,7 +1,7 @@
|
||||||
/* packet-dns.c
|
/* packet-dns.c
|
||||||
* Routines for DNS packet disassembly
|
* Routines for DNS packet disassembly
|
||||||
*
|
*
|
||||||
* $Id: packet-dns.c,v 1.13 1999/01/04 09:13:46 guy Exp $
|
* $Id: packet-dns.c,v 1.14 1999/01/05 09:01:42 guy Exp $
|
||||||
*
|
*
|
||||||
* Ethereal - Network traffic analyzer
|
* Ethereal - Network traffic analyzer
|
||||||
* By Gerald Combs <gerald@zing.org>
|
* By Gerald Combs <gerald@zing.org>
|
||||||
|
@ -517,12 +517,12 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
|
||||||
add_item_to_tree(dns_tree, offset + DNS_ID, 2, "Transaction ID: 0x%04x",
|
add_item_to_tree(dns_tree, offset + DNS_ID, 2, "Transaction ID: 0x%04x",
|
||||||
id);
|
id);
|
||||||
|
|
||||||
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown (%x)"));
|
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown operation"));
|
||||||
if (flags & F_RESPONSE) {
|
if (flags & F_RESPONSE) {
|
||||||
strcat(buf, " response");
|
strcat(buf, " response");
|
||||||
strcat(buf, ", ");
|
strcat(buf, ", ");
|
||||||
strcat(buf, val_to_str(flags & F_RCODE, rcode_vals,
|
strcat(buf, val_to_str(flags & F_RCODE, rcode_vals,
|
||||||
"Unknown error (%x)"));
|
"Unknown error"));
|
||||||
}
|
}
|
||||||
tf = add_item_to_tree(dns_tree, offset + DNS_FLAGS, 2, "Flags: 0x%04x (%s)",
|
tf = add_item_to_tree(dns_tree, offset + DNS_FLAGS, 2, "Flags: 0x%04x (%s)",
|
||||||
flags, buf);
|
flags, buf);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
|
||||||
* Much stuff added by Guy Harris <guy@netapp.com>
|
* Much stuff added by Guy Harris <guy@netapp.com>
|
||||||
*
|
*
|
||||||
* $Id: packet-nbns.c,v 1.12 1999/01/05 08:48:39 guy Exp $
|
* $Id: packet-nbns.c,v 1.13 1999/01/05 09:01:42 guy Exp $
|
||||||
*
|
*
|
||||||
* Ethereal - Network traffic analyzer
|
* Ethereal - Network traffic analyzer
|
||||||
* By Gerald Combs <gerald@zing.org>
|
* By Gerald Combs <gerald@zing.org>
|
||||||
|
@ -365,12 +365,12 @@ nbns_add_nbns_flags(GtkWidget *nbns_tree, int offset, u_short flags,
|
||||||
};
|
};
|
||||||
|
|
||||||
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals,
|
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals,
|
||||||
"Unknown (%x)"));
|
"Unknown operation"));
|
||||||
if (flags & F_RESPONSE && !is_wack) {
|
if (flags & F_RESPONSE && !is_wack) {
|
||||||
strcat(buf, " response");
|
strcat(buf, " response");
|
||||||
strcat(buf, ", ");
|
strcat(buf, ", ");
|
||||||
strcat(buf, val_to_str(flags & F_RCODE, rcode_vals,
|
strcat(buf, val_to_str(flags & F_RCODE, rcode_vals,
|
||||||
"Unknown error (%x)"));
|
"Unknown error"));
|
||||||
}
|
}
|
||||||
tf = add_item_to_tree(nbns_tree, offset, 2,
|
tf = add_item_to_tree(nbns_tree, offset, 2,
|
||||||
"Flags: 0x%04x (%s)", flags, buf);
|
"Flags: 0x%04x (%s)", flags, buf);
|
||||||
|
|
Loading…
Reference in New Issue