diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-09-25 23:24:07 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 1998-09-25 23:24:07 +0000 |
commit | 8ebc4133148f1445f0e14a731df82d281c79da34 (patch) | |
tree | 8d5725d0fe36059aa33286b93b05f4a9f701d193 /packet-ppp.c | |
parent | 86872f354f4f7d9cbf18fd305e90a7ad9bbb2657 (diff) |
* Ethernet manufacturer support (Laurent)
* PPP fixes (Gerald)
* Null/loopback interface support (Gerald)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ppp.c')
-rw-r--r-- | packet-ppp.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/packet-ppp.c b/packet-ppp.c index 45ee59c315..c0dc47f9b3 100644 --- a/packet-ppp.c +++ b/packet-ppp.c @@ -1,7 +1,7 @@ /* packet-ppp.c * Routines for ppp packet disassembly * - * $Id: packet-ppp.c,v 1.2 1998/09/16 03:22:09 gerald Exp $ + * $Id: packet-ppp.c,v 1.3 1998/09/25 23:24:02 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -40,42 +40,38 @@ dissect_ppp( const u_char *pd, frame_data *fd, GtkTree *tree ) { e_ppphdr ph; GtkWidget *ti, *fh_tree; - guchar flag, addr, control; - guint protocol; - - ph.ppp_flag = pd[0]; - ph.ppp_addr = pd[1]; - ph.ppp_ctl = pd[2]; - ph.ppp_prot = pntohs(&pd[3]); + ph.ppp_addr = pd[0]; + ph.ppp_ctl = pd[1]; + ph.ppp_prot = pntohs(&pd[2]); /* load the top pane info. This should be overwritten by the next protocol in the stack */ if(fd->win_info[0]) { strcpy(fd->win_info[1], "N/A" ); strcpy(fd->win_info[2], "N/A" ); + strcpy(fd->win_info[3], "N/A" ); strcpy(fd->win_info[4], "PPP" ); } /* populate a tree in the second pane with the status of the link layer (ie none) */ if(tree) { - ti = add_item_to_tree( GTK_WIDGET(tree), 0, 5, + ti = add_item_to_tree( GTK_WIDGET(tree), 0, 4, "Point-to-Point Protocol (%d on link, %d captured)", fd->pkt_len, fd->cap_len ); fh_tree = gtk_tree_new(); add_subtree(ti, fh_tree, ETT_PPP); - add_item_to_tree(fh_tree, 0, 1, "Flag: %02x", ph.ppp_flag); - add_item_to_tree(fh_tree, 1, 1, "Address: %02x", ph.ppp_addr); - add_item_to_tree(fh_tree, 2, 1, "Control: %02x", ph.ppp_ctl); - add_item_to_tree(fh_tree, 3, 2, "Protocol: %04x", ph.ppp_prot); + add_item_to_tree(fh_tree, 0, 1, "Address: %02x", ph.ppp_addr); + add_item_to_tree(fh_tree, 1, 1, "Control: %02x", ph.ppp_ctl); + add_item_to_tree(fh_tree, 2, 2, "Protocol: %04x", ph.ppp_prot); } switch (ph.ppp_prot) { case 0x0021: - dissect_ip(pd, 5, fd, tree); + dissect_ip(pd, 4, fd, tree); break; default: - dissect_data(pd, 5, fd, tree); + dissect_data(pd, 4, fd, tree); break; } } |