summaryrefslogtreecommitdiff
path: root/column.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-12-10 01:17:21 +0000
committerGuy Harris <guy@alum.mit.edu>2002-12-10 01:17:21 +0000
commit92d90f4f28aecff5b11e1b9712e6eea2bf50c8e4 (patch)
tree4e5e5115c1bda502d83cfb16f1f6c58a5851efbb /column.c
parent644d19129a55c272f4be1ed989750058bb85d334 (diff)
downloadwireshark-92d90f4f28aecff5b11e1b9712e6eea2bf50c8e4.tar.gz
Add a new type of column for the circuit ID (Frame Relay DLCI, ISDN
channel number, X.25 logical channel number). Clean up white space and the like, and get rid of unnecessary arguments to "col_set_port()". svn path=/trunk/; revision=6772
Diffstat (limited to 'column.c')
-rw-r--r--column.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/column.c b/column.c
index 4617a48eae..fe574c45cb 100644
--- a/column.c
+++ b/column.c
@@ -1,7 +1,7 @@
/* column.c
* Routines for handling column preferences
*
- * $Id: column.c,v 1.39 2002/12/10 00:12:57 guy Exp $
+ * $Id: column.c,v 1.40 2002/12/10 01:17:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,7 +52,7 @@ col_format_to_string(gint fmt) {
"%us","%hs", "%rhs", "%uhs", "%ns", "%rns", "%uns", "%d",
"%rd", "%ud", "%hd", "%rhd", "%uhd", "%nd", "%rnd",
"%und", "%S", "%rS", "%uS", "%D", "%rD", "%uD", "%p",
- "%i", "%L", "%XO", "%XR", "%I" };
+ "%i", "%L", "%XO", "%XR", "%I", "%c" };
if (fmt < 0 || fmt > NUM_COL_FMTS)
return NULL;
@@ -80,7 +80,8 @@ col_format_desc(gint fmt) {
"Src port (unresolved)", "Destination port",
"Dest port (resolved)", "Dest port (unresolved)",
"Protocol", "Information", "Packet length (bytes)" ,
- "OXID", "RXID", "FW-1 monitor if/direction" };
+ "OXID", "RXID", "FW-1 monitor if/direction",
+ "Circuit ID" };
return(dlist[fmt]);
}
@@ -147,6 +148,9 @@ get_column_format_matches(gboolean *fmt_list, gint format) {
case COL_IF_DIR:
fmt_list[COL_IF_DIR] = TRUE;
break;
+ case COL_CIRCUIT_ID:
+ fmt_list[COL_CIRCUIT_ID] = TRUE;
+ break;
default:
break;
}
@@ -230,6 +234,9 @@ get_column_longest_string(gint format)
case COL_IF_DIR:
return "i 00000000 I";
break;
+ case COL_CIRCUIT_ID:
+ return "000000";
+ break;
default: /* COL_INFO */
return "Source port: kerberos-master Destination port: kerberos-master";
break;
@@ -262,6 +269,7 @@ get_column_resize_type(gint format) {
case COL_PROTOCOL:
case COL_PACKET_LENGTH:
case COL_IF_DIR:
+ case COL_CIRCUIT_ID:
/* We don't want these to resize during a live capture, as that
gets in the way of trying to look at the data while it's being
captured. */
@@ -391,15 +399,18 @@ get_column_format_from_str(gchar *str) {
case 'L':
return COL_PACKET_LENGTH;
break;
- case 'I':
- return COL_IF_DIR;
- break;
case 'X':
prev_code = COL_OXID;
break;
case 'O':
return COL_OXID;
break;
+ case 'I':
+ return COL_IF_DIR;
+ break;
+ case 'c':
+ return COL_CIRCUIT_ID;
+ break;
}
cptr++;
}