aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-11-17 04:29:13 +0000
committerGerald Combs <gerald@wireshark.org>1998-11-17 04:29:13 +0000
commit6ca358948b8c5aa99a4e0db8595f601ab834e76e (patch)
tree750ab11a6661c391b126d4ce990b7fc01cb98d46 /packet-ipv6.c
parent8d616b03429fe2185782f5153d7b187a44698b5d (diff)
* Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. svn path=/trunk/; revision=97
Diffstat (limited to 'packet-ipv6.c')
-rw-r--r--packet-ipv6.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 1335f58685..b9466e5b22 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.4 1998/11/12 00:06:29 gram Exp $
+ * $Id: packet-ipv6.c,v 1.5 1998/11/17 04:28:55 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -52,22 +52,23 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
memcpy(&ipv6, (void *) &pd[offset], 8);
- if (fd->win_info[COL_NUM]) {
- switch(ipv6.next_header){
- /*
- case IP_PROTO_ICMP:
- case IP_PROTO_IGMP:
- case IP_PROTO_TCP:
- case IP_PROTO_UDP:
- case IP_PROTO_OSPF:
- */
- /* Names are set in the associated dissect_* routines */
- /* break; */
- default:
- strcpy(fd->win_info[COL_PROTOCOL], "IPv6");
- sprintf(fd->win_info[COL_INFO], "IPv6 support is still under development (%d)", ipv6.next_header);
- }
+ switch(ipv6.next_header){
+ /*
+ case IP_PROTO_ICMP:
+ case IP_PROTO_IGMP:
+ case IP_PROTO_TCP:
+ case IP_PROTO_UDP:
+ case IP_PROTO_OSPF:
+ */
+ /* Names are set in the associated dissect_* routines */
+ /* break; */
+ default:
+ if (check_col(fd, COL_PROTOCOL))
+ col_add_str(fd, COL_PROTOCOL, "IPv6");
+ if (check_col(fd, COL_INFO))
+ col_add_fstr(fd, COL_INFO, "IPv6 support is still under development (%d)", ipv6.next_header);
}
+
if (tree) {
/* !!! specify length */
ti = add_item_to_tree(GTK_WIDGET(tree), offset, 40,