aboutsummaryrefslogtreecommitdiffstats
path: root/column.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-12-10 01:17:21 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-12-10 01:17:21 +0000
commit63b1e7c029e34764f99cfe5254c349a2d1b74d20 (patch)
tree4e5e5115c1bda502d83cfb16f1f6c58a5851efbb /column.c
parentaa08f497dccd61a1781355951ba456f914dba1ad (diff)
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()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6772 f5534014-38df-0310-8fa8-9805f1628bb7
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++;
}