aboutsummaryrefslogtreecommitdiffstats
path: root/packet-atalk.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-07-29 05:47:07 +0000
commit7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch)
tree3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-atalk.c
parent6f1d3a3be830da628246f7cea77fe9c491470d17 (diff)
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. svn path=/trunk/; revision=402
Diffstat (limited to 'packet-atalk.c')
-rw-r--r--packet-atalk.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/packet-atalk.c b/packet-atalk.c
index 726d91cde4..27dd684483 100644
--- a/packet-atalk.c
+++ b/packet-atalk.c
@@ -35,6 +35,8 @@
extern packet_info pi;
+static int proto_ddp = -1;
+
/* P = Padding, H = Hops, L = Len */
#if BYTE_ORDER == BIG_ENDIAN
/* PPHHHHLL LLLLLLLL */
@@ -91,7 +93,7 @@ dissect_ddp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
if (tree) {
- ti = proto_tree_add_text(tree, offset, 13, "Datagram Delivery Protocol");
+ ti = proto_tree_add_item(tree, proto_ddp, offset, 13, NULL);
ddp_tree = proto_item_add_subtree(ti, ETT_IP);
proto_tree_add_text(ddp_tree, offset, 1, "Hop count: %d", ddp_hops(ddp.hops_len));
proto_tree_add_text(ddp_tree, offset, 2, "Datagram length: %d", ddp_len(ddp.hops_len));
@@ -108,3 +110,15 @@ dissect_ddp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
offset += 13;
}
+
+void
+proto_register_atalk(void)
+{
+/* static hf_register_info hf[] = {
+ { &variable,
+ { "Name", "ddp.abbreviation", TYPE, VALS_POINTER }},
+ };*/
+
+ proto_ddp = proto_register_protocol("Datagram Delivery Protocol", "ddp");
+ /* proto_register_field_array(proto_ddp, hf, array_length(hf));*/
+}