Have the Etherenet and PPP dissectors register themselves, and have
[obnox/wireshark/wip.git] / packet-bootp.c
index 9e8ab5977daf6ad960b36b30c80d3ba35050198d..ce22592c3bdd1e71141c73eae567ae173d9626de 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BOOTP/DHCP packet disassembly
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-bootp.c,v 1.37 2000/07/25 21:25:59 guy Exp $
+ * $Id: packet-bootp.c,v 1.41 2000/11/17 21:00:35 gram Exp $
  *
  * The information used comes from:
  * RFC  951: Bootstrap Protocol
@@ -41,6 +41,7 @@
 # include <sys/types.h>
 #endif
 
+#include <string.h>
 #include <glib.h>
 #include "packet.h"
 #include "packet-arp.h"
@@ -622,6 +623,8 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
        guint32         ip_addr;
        const char      *dhcp_type;
 
+       OLD_CHECK_DISPLAY_AS_DATA(proto_bootp, pd, offset, fd, tree);
+
        dhcp_type = NULL;
 
        if (check_col(fd, COL_PROTOCOL))
@@ -686,8 +689,8 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                                                     pd[offset+2], pd[offset+1]));
                }
                else {
-                       proto_tree_add_bytes(bp_tree, hf_bootp_hw_addr, NullTVB, 
-                                                  offset + 28, 0, NULL);
+                       proto_tree_add_text(bp_tree,  NullTVB, 
+                                                  offset + 28, 0, "Client address not given");
                }
 
                /* The server host name is optional */
@@ -834,5 +837,5 @@ proto_register_bootp(void)
 void
 proto_reg_handoff_bootp(void)
 {
-  dissector_add("udp.port", UDP_PORT_BOOTPS, dissect_bootp);
+  old_dissector_add("udp.port", UDP_PORT_BOOTPS, dissect_bootp);
 }