Remove the deprecated column types so users don't think they still exist.

Bug: 11559
Change-Id: I51836dc9a4fa399835c7bdabcba577ebd40327ad
Reviewed-on: https://code.wireshark.org/review/13538
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2016-01-25 23:01:46 -05:00 committed by Anders Broman
parent 0b7583b370
commit 850f5d3be0
5 changed files with 202 additions and 245 deletions

View File

@ -584,8 +584,7 @@ based on the time-value.
For example: For example:
nstime_delta(&ts, &pinfo->fd->abs_ts, &tcpd->ts_first); col_set_time(pinfo->cinfo, COL_REL_TIME, &ts, "s4607.ploc.time");
col_set_time(pinfo->cinfo, COL_REL_CONV_TIME, &ts, "tcp.time_relative");
1.5 Constructing the protocol tree. 1.5 Constructing the protocol tree.
@ -2553,10 +2552,9 @@ selected in random order once the whole file has been read.
After calculating the conversation timestamps, it is time to put them in After calculating the conversation timestamps, it is time to put them in
the appropriate columns with the function 'col_set_time' (described in the appropriate columns with the function 'col_set_time' (described in
section 1.5.9). There are two columns for conversation timestamps: section 1.5.9). The column used for relative timestamps is:
COL_REL_CONV_TIME, /* Relative time to beginning of conversation */ COL_REL_TIME, /* Delta time to last frame in conversation */
COL_DELTA_CONV_TIME,/* Delta time to last frame in conversation */
Last but not least, there MUST be a preference in each dissector that Last but not least, there MUST be a preference in each dissector that
uses conversation timestamps that makes it possible to enable and uses conversation timestamps that makes it possible to enable and

View File

@ -1789,8 +1789,7 @@ col_set_fmt_time(const frame_data *fd, column_info *cinfo, const gint fmt, const
/* --------------------------- */ /* --------------------------- */
/* Set the given (relative) time to a column element. /* Set the given (relative) time to a column element.
* *
* Used by multiple dissectors to set the time in the column * Used by dissectors to set the time in a column
* COL_DELTA_CONV_TIME
* *
* @param cinfo the current packet row * @param cinfo the current packet row
* @param el the column to use, e.g. COL_INFO * @param el the column to use, e.g. COL_INFO

View File

@ -55,66 +55,53 @@ enum {
COL_ABS_YMD_TIME, /**< 1) Absolute date, as YYYY-MM-DD, and time */ COL_ABS_YMD_TIME, /**< 1) Absolute date, as YYYY-MM-DD, and time */
COL_ABS_YDOY_TIME, /**< 2) Absolute date, as YYYY/DOY, and time */ COL_ABS_YDOY_TIME, /**< 2) Absolute date, as YYYY/DOY, and time */
COL_ABS_TIME, /**< 3) Absolute time */ COL_ABS_TIME, /**< 3) Absolute time */
COL_CIRCUIT_ID, /**< 4) Circuit ID */ COL_VSAN, /**< 4) VSAN - Cisco MDS-specific */
COL_DSTIDX, /**< 5) !! DEPRECATED !! - Dst port idx - Cisco MDS-specific */ COL_CUMULATIVE_BYTES, /**< 5) Cumulative number of bytes */
COL_SRCIDX, /**< 6) !! DEPRECATED !! - Src port idx - Cisco MDS-specific */ COL_CUSTOM, /**< 6) Custom column (any filter name's contents) */
COL_VSAN, /**< 7) VSAN - Cisco MDS-specific */ COL_DCE_CALL, /**< 7) DCE/RPC connection oriented call id OR datagram sequence number */
COL_CUMULATIVE_BYTES, /**< 8) Cumulative number of bytes */ COL_DELTA_TIME, /**< 8) Delta time */
COL_CUSTOM, /**< 9) Custom column (any filter name's contents) */ COL_DELTA_TIME_DIS, /**< 9) Delta time displayed*/
COL_DCE_CALL, /**< 10) DCE/RPC connection oriented call id OR datagram sequence number */ COL_RES_DST, /**< 10) Resolved dest */
COL_DCE_CTX, /**< 11) !! DEPRECATED !! - DCE/RPC connection oriented context id */ COL_UNRES_DST, /**< 11) Unresolved dest */
COL_DELTA_TIME, /**< 12) Delta time */ COL_RES_DST_PORT, /**< 12) Resolved dest port */
COL_DELTA_CONV_TIME,/**< 13) Delta time to last frame in conversation */ COL_UNRES_DST_PORT, /**< 13) Unresolved dest port */
COL_DELTA_TIME_DIS, /**< 14) Delta time displayed*/ COL_DEF_DST, /**< 14) Destination address */
COL_RES_DST, /**< 15) Resolved dest */ COL_DEF_DST_PORT, /**< 15) Destination port */
COL_UNRES_DST, /**< 16) Unresolved dest */ COL_EXPERT, /**< 16) Expert Info */
COL_RES_DST_PORT, /**< 17) Resolved dest port */ COL_IF_DIR, /**< 17) FW-1 monitor interface/direction */
COL_UNRES_DST_PORT, /**< 18) Unresolved dest port */ COL_FREQ_CHAN, /**< 18) IEEE 802.11 (and WiMax?) - Channel */
COL_DEF_DST, /**< 19) Destination address */ COL_DEF_DL_DST, /**< 19) Data link layer dest address */
COL_DEF_DST_PORT, /**< 20) Destination port */ COL_DEF_DL_SRC, /**< 20) Data link layer source address */
COL_EXPERT, /**< 21) Expert Info */ COL_RES_DL_DST, /**< 21) Resolved DL dest */
COL_IF_DIR, /**< 22) FW-1 monitor interface/direction */ COL_UNRES_DL_DST, /**< 22) Unresolved DL dest */
COL_OXID, /**< 23) !! DEPRECATED !! - Fibre Channel OXID */ COL_RES_DL_SRC, /**< 23) Resolved DL source */
COL_RXID, /**< 24) !! DEPRECATED !! - Fibre Channel RXID */ COL_UNRES_DL_SRC, /**< 24) Unresolved DL source */
COL_FR_DLCI, /**< 25) !! DEPRECATED !! - Frame Relay DLCI */ COL_RSSI, /**< 25) IEEE 802.11 - received signal strength */
COL_FREQ_CHAN, /**< 26) IEEE 802.11 (and WiMax?) - Channel */ COL_TX_RATE, /**< 26) IEEE 802.11 - TX rate in Mbps */
COL_BSSGP_TLLI, /**< 27) !! DEPRECATED !! - GPRS BSSGP IE TLLI */ COL_DSCP_VALUE, /**< 27) IP DSCP Value */
COL_HPUX_DEVID, /**< 28) !! DEPRECATED !! - HP-UX Nettl Device ID */ COL_INFO, /**< 28) Description */
COL_HPUX_SUBSYS, /**< 29) !! DEPRECATED !! - HP-UX Nettl Subsystem */ COL_RES_NET_DST, /**< 29) Resolved net dest */
COL_DEF_DL_DST, /**< 30) Data link layer dest address */ COL_UNRES_NET_DST, /**< 30) Unresolved net dest */
COL_DEF_DL_SRC, /**< 31) Data link layer source address */ COL_RES_NET_SRC, /**< 31) Resolved net source */
COL_RES_DL_DST, /**< 32) Resolved DL dest */ COL_UNRES_NET_SRC, /**< 32) Unresolved net source */
COL_UNRES_DL_DST, /**< 33) Unresolved DL dest */ COL_DEF_NET_DST, /**< 33) Network layer dest address */
COL_RES_DL_SRC, /**< 34) Resolved DL source */ COL_DEF_NET_SRC, /**< 34) Network layer source address */
COL_UNRES_DL_SRC, /**< 35) Unresolved DL source */ COL_NUMBER, /**< 35) Packet list item number */
COL_RSSI, /**< 36) IEEE 802.11 - received signal strength */ COL_PACKET_LENGTH, /**< 36) Packet length in bytes */
COL_TX_RATE, /**< 37) IEEE 802.11 - TX rate in Mbps */ COL_PROTOCOL, /**< 37) Protocol */
COL_DSCP_VALUE, /**< 38) IP DSCP Value */ COL_REL_TIME, /**< 38) Relative time */
COL_INFO, /**< 39) Description */ COL_DEF_SRC, /**< 39) Source address */
COL_COS_VALUE, /**< 40) !! DEPRECATED !! - L2 COS Value */ COL_DEF_SRC_PORT, /**< 40) Source port */
COL_RES_NET_DST, /**< 41) Resolved net dest */ COL_RES_SRC, /**< 41) Resolved source */
COL_UNRES_NET_DST, /**< 42) Unresolved net dest */ COL_UNRES_SRC, /**< 42) Unresolved source */
COL_RES_NET_SRC, /**< 43) Resolved net source */ COL_RES_SRC_PORT, /**< 43) Resolved source port */
COL_UNRES_NET_SRC, /**< 44) Unresolved net source */ COL_UNRES_SRC_PORT, /**< 44) Unresolved source port */
COL_DEF_NET_DST, /**< 45) Network layer dest address */ COL_TEI, /**< 45) Q.921 TEI */
COL_DEF_NET_SRC, /**< 46) Network layer source address */ COL_UTC_YMD_TIME, /**< 46) UTC date, as YYYY-MM-DD, and time */
COL_NUMBER, /**< 47) Packet list item number */ COL_UTC_YDOY_TIME, /**< 47) UTC date, as YYYY/DOY, and time */
COL_PACKET_LENGTH, /**< 48) Packet length in bytes */ COL_UTC_TIME, /**< 48) UTC time */
COL_PROTOCOL, /**< 49) Protocol */ COL_CLS_TIME, /**< 49) Command line-specified time (default relative) */
COL_REL_TIME, /**< 50) Relative time */ NUM_COL_FMTS /**< 50) Should always be last */
COL_REL_CONV_TIME, /**< 51) !! DEPRECATED !! - Relative time to beginning of conversation */
COL_DEF_SRC, /**< 52) Source address */
COL_DEF_SRC_PORT, /**< 53) Source port */
COL_RES_SRC, /**< 54) Resolved source */
COL_UNRES_SRC, /**< 55) Unresolved source */
COL_RES_SRC_PORT, /**< 56) Resolved source port */
COL_UNRES_SRC_PORT, /**< 57) Unresolved source port */
COL_TEI, /**< 58) Q.921 TEI */
COL_UTC_YMD_TIME, /**< 59) UTC date, as YYYY-MM-DD, and time */
COL_UTC_YDOY_TIME, /**< 60) UTC date, as YYYY/DOY, and time */
COL_UTC_TIME, /**< 61) UTC time */
COL_CLS_TIME, /**< 62) Command line-specified time (default relative) */
NUM_COL_FMTS /**< 63) Should always be last */
}; };
/** Allocate all the data structures for constructing column data, given /** Allocate all the data structures for constructing column data, given
@ -356,8 +343,7 @@ WS_DLL_PUBLIC void col_append_sep_fstr(column_info *cinfo, const gint col, const
/** Set the given (relative) time to a column element. /** Set the given (relative) time to a column element.
* *
* Used by multiple dissectors to set the time in the column * Used by dissectors to set the time in a column
* COL_DELTA_CONV_TIME
* *
* @param cinfo the current packet row * @param cinfo the current packet row
* @param col the column to use, e.g. COL_INFO * @param col the column to use, e.g. COL_INFO

View File

@ -45,67 +45,71 @@ col_format_to_string(const gint fmt) {
"%Yt", /* 1) COL_ABS_YMD_TIME */ "%Yt", /* 1) COL_ABS_YMD_TIME */
"%YDOYt", /* 2) COL_ABS_YDOY_TIME */ "%YDOYt", /* 2) COL_ABS_YDOY_TIME */
"%At", /* 3) COL_ABS_TIME */ "%At", /* 3) COL_ABS_TIME */
"%c", /* 4) COL_CIRCUIT_ID */ "%V", /* 4) COL_VSAN - !! DEPRECATED !!*/
"%Xd", /* 5) COL_DSTIDX - !! DEPRECATED !!*/ "%B", /* 5) COL_CUMULATIVE_BYTES */
"%Xs", /* 6) COL_SRCIDX - !! DEPRECATED !!*/ "%Cus", /* 6 COL_CUSTOM */
"%V", /* 7) COL_VSAN - !! DEPRECATED !!*/ "%y", /* 7) COL_DCE_CALL */
"%B", /* 8) COL_CUMULATIVE_BYTES */ "%Tt", /* 8) COL_DELTA_TIME */
"%Cus", /* 9) COL_CUSTOM */ "%Gt", /* 9) COL_DELTA_TIME_DIS */
"%y", /* 10) COL_DCE_CALL */ "%rd", /* 10) COL_RES_DST */
"%z", /* 11) COL_DCE_CTX */ "%ud", /* 11) COL_UNRES_DST */
"%Tt", /* 12) COL_DELTA_TIME */ "%rD", /* 12) COL_RES_DST_PORT */
"%dct", /* 13) COL_DELTA_CONV_TIME */ "%uD", /* 13) COL_UNRES_DST_PORT */
"%Gt", /* 14) COL_DELTA_TIME_DIS */ "%d", /* 14) COL_DEF_DST */
"%rd", /* 15) COL_RES_DST */ "%D", /* 15) COL_DEF_DST_PORT */
"%ud", /* 16) COL_UNRES_DST */ "%a", /* 16) COL_EXPERT */
"%rD", /* 17) COL_RES_DST_PORT */ "%I", /* 17) COL_IF_DIR */
"%uD", /* 18) COL_UNRES_DST_PORT */ "%F", /* 18) COL_FREQ_CHAN */
"%d", /* 19) COL_DEF_DST */ "%hd", /* 19) COL_DEF_DL_DST */
"%D", /* 20) COL_DEF_DST_PORT */ "%hs", /* 20) COL_DEF_DL_SRC */
"%a", /* 21) COL_EXPERT */ "%rhd", /* 21) COL_RES_DL_DST */
"%I", /* 22) COL_IF_DIR */ "%uhd", /* 22) COL_UNRES_DL_DST */
"%XO", /* 23) COL_OXID */ "%rhs", /* 23) COL_RES_DL_SRC*/
"%XR", /* 24) COL_RXID */ "%uhs", /* 24) COL_UNRES_DL_SRC */
"%C", /* 25) !! DEPRECATED !! - COL_FR_DLCI */ "%e", /* 25) COL_RSSI */
"%F", /* 26) COL_FREQ_CHAN */ "%x", /* 26) COL_TX_RATE */
"%l", /* 27) !! DEPRECATED !! - COL_BSSGP_TLLI */ "%f", /* 27) COL_DSCP_VALUE */
"%P", /* 28) !! DEPRECATED !! - COL_HPUX_DEVID */ "%i", /* 28) COL_INFO */
"%H", /* 29) !! DEPRECATED !! - COL_HPUX_SUBSYS */ "%rnd", /* 29) COL_RES_NET_DST */
"%hd", /* 30) COL_DEF_DL_DST */ "%und", /* 30) COL_UNRES_NET_DST */
"%hs", /* 31) COL_DEF_DL_SRC */ "%rns", /* 31) COL_RES_NET_SRC */
"%rhd", /* 32) COL_RES_DL_DST */ "%uns", /* 32) COL_UNRES_NET_SRC */
"%uhd", /* 33) COL_UNRES_DL_DST */ "%nd", /* 33) COL_DEF_NET_DST */
"%rhs", /* 34) COL_RES_DL_SRC*/ "%ns", /* 34) COL_DEF_NET_SRC */
"%uhs", /* 35) COL_UNRES_DL_SRC */ "%m", /* 35) COL_NUMBER */
"%e", /* 36) COL_RSSI */ "%L", /* 36) COL_PACKET_LENGTH */
"%x", /* 37) COL_TX_RATE */ "%p", /* 37) COL_PROTOCOL */
"%f", /* 38) COL_DSCP_VALUE */ "%Rt", /* 38) COL_REL_TIME */
"%i", /* 39) COL_INFO */ "%s", /* 39) COL_DEF_SRC */
"%U", /* 40) !! DEPRECATED !! - COL_COS_VALUE */ "%S", /* 40) COL_DEF_SRC_PORT */
"%rnd", /* 41) COL_RES_NET_DST */ "%rs", /* 41) COL_RES_SRC */
"%und", /* 42) COL_UNRES_NET_DST */ "%us", /* 42) COL_UNRES_SRC */
"%rns", /* 43) COL_RES_NET_SRC */ "%rS", /* 43) COL_RES_SRC_PORT */
"%uns", /* 44) COL_UNRES_NET_SRC */ "%uS", /* 44) COL_UNRES_SRC_PORT */
"%nd", /* 45) COL_DEF_NET_DST */ "%E", /* 45) COL_TEI */
"%ns", /* 46) COL_DEF_NET_SRC */ "%Yut", /* 46) COL_UTC_YMD_TIME */
"%m", /* 47) COL_NUMBER */ "%YDOYut", /* 47) COL_UTC_YDOY_TIME */
"%L", /* 48) COL_PACKET_LENGTH */ "%Aut", /* 48) COL_UTC_TIME */
"%p", /* 49) COL_PROTOCOL */ "%t" /* 49) COL_CLS_TIME */
"%Rt", /* 50) COL_REL_TIME */
"%rct", /* 51) !! DEPRECATED !! - COL_REL_CONV_TIME */
"%s", /* 52) COL_DEF_SRC */
"%S", /* 53) COL_DEF_SRC_PORT */
"%rs", /* 54) COL_RES_SRC */
"%us", /* 55) COL_UNRES_SRC */
"%rS", /* 56) COL_RES_SRC_PORT */
"%uS", /* 57) COL_UNRES_SRC_PORT */
"%E", /* 58) COL_TEI */
"%Yut", /* 59) COL_UTC_YMD_TIME */
"%YDOYut", /* 60) COL_UTC_YDOY_TIME */
"%Aut", /* 61) COL_UTC_TIME */
"%t" /* 62) COL_CLS_TIME */
}; };
/* The following formats have been used in deprecated columns. Noted here
* so they aren't reused
*
* "%U", COL_COS_VALUE
* "%c", COL_CIRCUIT_ID
* "%l", COL_BSSGP_TLLI
* "%H", COL_HPUX_SUBSYS
* "%P", COL_HPUX_DEVID
* "%C", COL_FR_DLCI
* "%rct", COL_REL_CONV_TIME
* "%dct", COL_DELTA_CONV_TIME
* "%XO", COL_OXID
* "%XR", COL_RXID
* "%Xd", COL_SRCIDX
* "%Xs", COL_DSTIDX
* "%z", COL_DCE_CTX
*/
if (fmt < 0 || fmt >= NUM_COL_FMTS) if (fmt < 0 || fmt >= NUM_COL_FMTS)
return NULL; return NULL;
@ -121,65 +125,52 @@ col_format_desc(const gint fmt) {
"Absolute date, as YYYY-MM-DD, and time", /* 1) COL_ABS_YMD_TIME */ "Absolute date, as YYYY-MM-DD, and time", /* 1) COL_ABS_YMD_TIME */
"Absolute date, as YYYY/DOY, and time", /* 2) COL_ABS_YDOY_TIME */ "Absolute date, as YYYY/DOY, and time", /* 2) COL_ABS_YDOY_TIME */
"Absolute time", /* 3) COL_ABS_TIME */ "Absolute time", /* 3) COL_ABS_TIME */
"Circuit ID", /* 4) COL_CIRCUIT_ID */ "Cisco VSAN", /* 4) COL_VSAN */
"Cisco Dst PortIdx", /* 5) COL_DSTIDX */ "Cumulative Bytes" , /* 5) COL_CUMULATIVE_BYTES */
"Cisco Src PortIdx", /* 6) COL_SRCIDX */ "Custom", /* 6) COL_CUSTOM */
"Cisco VSAN", /* 7) COL_VSAN */ "DCE/RPC call (cn_call_id / dg_seqnum)", /* 7) COL_DCE_CALL */
"Cumulative Bytes" , /* 8) COL_CUMULATIVE_BYTES */ "Delta time", /* 8) COL_DELTA_TIME */
"Custom", /* 9) COL_CUSTOM */ "Delta time displayed", /* 9) COL_DELTA_TIME_DIS */
"DCE/RPC call (cn_call_id / dg_seqnum)", /* 10) COL_DCE_CALL */ "Dest addr (resolved)", /* 10) COL_RES_DST */
"DCE/RPC context ID (cn_ctx_id)", /* 11) COL_DCE_CTX */ "Dest addr (unresolved)", /* 11) COL_UNRES_DST */
"Delta time", /* 12) COL_DELTA_TIME */ "Dest port (resolved)", /* 12) COL_RES_DST_PORT */
"Delta time (conversation)", /* 13) COL_DELTA_CONV_TIME */ "Dest port (unresolved)", /* 13) COL_UNRES_DST_PORT */
"Delta time displayed", /* 14) COL_DELTA_TIME_DIS */ "Destination address", /* 14) COL_DEF_DST */
"Dest addr (resolved)", /* 15) COL_RES_DST */ "Destination port", /* 15) COL_DEF_DST_PORT */
"Dest addr (unresolved)", /* 16) COL_UNRES_DST */ "Expert Info Severity", /* 16) COL_EXPERT */
"Dest port (resolved)", /* 17) COL_RES_DST_PORT */ "FW-1 monitor if/direction", /* 17) COL_IF_DIR */
"Dest port (unresolved)", /* 18) COL_UNRES_DST_PORT */ "Frequency/Channel", /* 18) COL_FREQ_CHAN */
"Destination address", /* 19) COL_DEF_DST */ "Hardware dest addr", /* 19) COL_DEF_DL_DST */
"Destination port", /* 20) COL_DEF_DST_PORT */ "Hardware src addr", /* 20) COL_DEF_DL_SRC */
"Expert Info Severity", /* 21) COL_EXPERT */ "Hw dest addr (resolved)", /* 21) COL_RES_DL_DST */
"FW-1 monitor if/direction", /* 22) COL_IF_DIR */ "Hw dest addr (unresolved)", /* 22) COL_UNRES_DL_DST */
"Fibre Channel OXID", /* 23) COL_OXID */ "Hw src addr (resolved)", /* 23) COL_RES_DL_SRC*/
"Fibre Channel RXID", /* 24) COL_RXID */ "Hw src addr (unresolved)", /* 24) COL_UNRES_DL_SRC */
"Frame Relay DLCI", /* 25) !! DEPRECATED !! - COL_FR_DLCI */ "IEEE 802.11 RSSI", /* 25) COL_RSSI */
"Frequency/Channel", /* 26) COL_FREQ_CHAN */ "IEEE 802.11 TX rate", /* 26) COL_TX_RATE */
"GPRS BSSGP TLLI", /* 27) !! DEPRECATED !! - COL_BSSGP_TLLI */ "IP DSCP Value", /* 27) COL_DSCP_VALUE */
"HP-UX Device ID", /* 28) !! DEPRECATED !! - COL_HPUX_DEVID */ "Information", /* 28) COL_INFO */
"HP-UX Subsystem", /* 29) !! DEPRECATED !! - COL_HPUX_SUBSYS */ "Net dest addr (resolved)", /* 29) COL_RES_NET_DST */
"Hardware dest addr", /* 30) COL_DEF_DL_DST */ "Net dest addr (unresolved)", /* 30) COL_UNRES_NET_DST */
"Hardware src addr", /* 31) COL_DEF_DL_SRC */ "Net src addr (resolved)", /* 31) COL_RES_NET_SRC */
"Hw dest addr (resolved)", /* 32) COL_RES_DL_DST */ "Net src addr (unresolved)", /* 32) COL_UNRES_NET_SRC */
"Hw dest addr (unresolved)", /* 33) COL_UNRES_DL_DST */ "Network dest addr", /* 33) COL_DEF_NET_DST */
"Hw src addr (resolved)", /* 34) COL_RES_DL_SRC*/ "Network src addr", /* 34) COL_DEF_NET_SRC */
"Hw src addr (unresolved)", /* 35) COL_UNRES_DL_SRC */ "Number", /* 35) COL_NUMBER */
"IEEE 802.11 RSSI", /* 36) COL_RSSI */ "Packet length (bytes)" , /* 36) COL_PACKET_LENGTH */
"IEEE 802.11 TX rate", /* 37) COL_TX_RATE */ "Protocol", /* 37) COL_PROTOCOL */
"IP DSCP Value", /* 38) COL_DSCP_VALUE */ "Relative time", /* 38) COL_REL_TIME */
"Information", /* 39) COL_INFO */ "Source address", /* 39) COL_DEF_SRC */
"L2 COS Value (802.1p)", /* 40) !! DEPRECATED !! - COL_COS_VALUE */ "Source port", /* 40) COL_DEF_SRC_PORT */
"Net dest addr (resolved)", /* 41) COL_RES_NET_DST */ "Src addr (resolved)", /* 41) COL_RES_SRC */
"Net dest addr (unresolved)", /* 42) COL_UNRES_NET_DST */ "Src addr (unresolved)", /* 42) COL_UNRES_SRC */
"Net src addr (resolved)", /* 43) COL_RES_NET_SRC */ "Src port (resolved)", /* 43) COL_RES_SRC_PORT */
"Net src addr (unresolved)", /* 44) COL_UNRES_NET_SRC */ "Src port (unresolved)", /* 44) COL_UNRES_SRC_PORT */
"Network dest addr", /* 45) COL_DEF_NET_DST */ "TEI", /* 45) COL_TEI */
"Network src addr", /* 46) COL_DEF_NET_SRC */ "UTC date, as YYYY-MM-DD, and time", /* 46) COL_UTC_YMD_TIME */
"Number", /* 47) COL_NUMBER */ "UTC date, as YYYY/DOY, and time", /* 47) COL_UTC_YDOY_TIME */
"Packet length (bytes)" , /* 48) COL_PACKET_LENGTH */ "UTC time", /* 48) COL_UTC_TIME */
"Protocol", /* 49) COL_PROTOCOL */ "Time (format as specified)" /* 49) COL_CLS_TIME */
"Relative time", /* 50) COL_REL_TIME */
"Relative time (conversation)", /* 51) !! DEPRECATED !! - COL_REL_CONV_TIME */
"Source address", /* 52) COL_DEF_SRC */
"Source port", /* 53) COL_DEF_SRC_PORT */
"Src addr (resolved)", /* 54) COL_RES_SRC */
"Src addr (unresolved)", /* 55) COL_UNRES_SRC */
"Src port (resolved)", /* 56) COL_RES_SRC_PORT */
"Src port (unresolved)", /* 57) COL_UNRES_SRC_PORT */
"TEI", /* 58) COL_TEI */
"UTC date, as YYYY-MM-DD, and time", /* 59) COL_UTC_YMD_TIME */
"UTC date, as YYYY/DOY, and time", /* 60) COL_UTC_YDOY_TIME */
"UTC time", /* 61) COL_UTC_TIME */
"Time (format as specified)" /* 62) COL_CLS_TIME */
}; };
g_assert((fmt >= 0) && (fmt < NUM_COL_FMTS)); g_assert((fmt >= 0) && (fmt < NUM_COL_FMTS));
@ -473,10 +464,6 @@ get_column_longest_string(const gint format)
case COL_DELTA_TIME_DIS: case COL_DELTA_TIME_DIS:
return get_timestamp_column_longest_string(TS_DELTA_DIS, timestamp_get_precision()); return get_timestamp_column_longest_string(TS_DELTA_DIS, timestamp_get_precision());
break; break;
case COL_REL_CONV_TIME: /* 'abuse' TS_RELATIVE to set the time format */
case COL_DELTA_CONV_TIME: /* for the conversation related time columns */
return get_timestamp_column_longest_string(TS_RELATIVE, timestamp_get_precision());
break;
case COL_DEF_SRC: case COL_DEF_SRC:
case COL_RES_SRC: case COL_RES_SRC:
case COL_UNRES_SRC: case COL_UNRES_SRC:
@ -514,20 +501,9 @@ get_column_longest_string(const gint format)
case COL_CUMULATIVE_BYTES: case COL_CUMULATIVE_BYTES:
return "00000000"; return "00000000";
break; break;
case COL_RXID:
case COL_OXID:
return "000000";
break;
case COL_IF_DIR: case COL_IF_DIR:
return "i 00000000 I"; return "i 00000000 I";
break; break;
case COL_CIRCUIT_ID:
return "000000";
break;
case COL_SRCIDX:
case COL_DSTIDX:
return "00000000";
break;
case COL_VSAN: case COL_VSAN:
return "000000"; return "000000";
break; break;
@ -537,36 +513,18 @@ get_column_longest_string(const gint format)
case COL_RSSI: case COL_RSSI:
return "100"; return "100";
break; break;
case COL_HPUX_SUBSYS:
return "OTS9000-TRANSPORT";
break;
case COL_HPUX_DEVID:
return "0000";
break;
case COL_DCE_CALL: case COL_DCE_CALL:
return "0000"; return "0000";
break; break;
case COL_DCE_CTX:
return "0000";
break;
case COL_8021Q_VLAN_ID: case COL_8021Q_VLAN_ID:
return "0000"; return "0000";
break; break;
case COL_DSCP_VALUE: case COL_DSCP_VALUE:
return "00"; return "00";
break; break;
case COL_COS_VALUE:
return "0";
break;
case COL_TEI: case COL_TEI:
return "127"; return "127";
break; break;
case COL_FR_DLCI:
return "8388608";
break;
case COL_BSSGP_TLLI:
return "0xffffffff";
break;
case COL_EXPERT: case COL_EXPERT:
return "ERROR"; return "ERROR";
break; break;

View File

@ -2840,6 +2840,45 @@ find_val_for_string(const char *needle, const enum_val_t *haystack,
return default_value; return default_value;
} }
/* Array of columns that have been migrated to custom columns */
struct deprecated_columns {
const gchar *col_fmt;
const gchar *col_expr;
};
static struct deprecated_columns migrated_columns[] = {
{ /* COL_COS_VALUE */ "%U", "vlan.priority" },
{ /* COL_CIRCUIT_ID */ "%c", "iax2.call" },
{ /* COL_BSSGP_TLLI */ "%l", "bssgp.tlli" },
{ /* COL_HPUX_SUBSYS */ "%H", "nettl.subsys" },
{ /* COL_HPUX_DEVID */ "%P", "nettl.devid" },
{ /* COL_FR_DLCI */ "%C", "fr.dlci" },
{ /* COL_REL_CONV_TIME */ "%rct", "tcp.time_relative" },
{ /* COL_DELTA_CONV_TIME */ "%dct", "tcp.time_delta" },
{ /* COL_OXID */ "%XO", "fc.ox_id" },
{ /* COL_RXID */ "%XR", "fc.rx_id" },
{ /* COL_SRCIDX */ "%Xd", "mdshdr.srcidx" },
{ /* COL_DSTIDX */ "%Xs", "mdshdr.dstidx" },
{ /* COL_DCE_CTX */ "%z", "dcerpc.cn_ctx_id" }
};
static gboolean
is_deprecated_column_format(const gchar* fmt)
{
guint haystack_idx;
for (haystack_idx = 0;
haystack_idx < G_N_ELEMENTS(migrated_columns);
++haystack_idx) {
if (strcmp(migrated_columns[haystack_idx].col_fmt, fmt) == 0) {
return TRUE;
}
}
return FALSE;
}
/* Preferences file format: /* Preferences file format:
* - Configuration directives start at the beginning of the line, and * - Configuration directives start at the beginning of the line, and
* are terminated with a colon. * are terminated with a colon.
@ -2896,7 +2935,7 @@ parse_column_format(fmt_data *cfmt, const char *fmt)
g_strfreev(cust_format_info); g_strfreev(cust_format_info);
} else { } else {
col_fmt = get_column_format_from_str(fmt); col_fmt = get_column_format_from_str(fmt);
if (col_fmt == -1) if ((col_fmt == -1) && (!is_deprecated_column_format(fmt)))
return FALSE; return FALSE;
} }
@ -3852,32 +3891,10 @@ string_to_name_resolve(const char *string, e_addr_resolve *name_resolve)
return '\0'; return '\0';
} }
static void static void
try_convert_to_custom_column(gpointer *el_data) try_convert_to_custom_column(gpointer *el_data)
{ {
/* Array of columns that have been migrated to custom columns */
struct {
gint el;
const gchar *col_expr;
} migrated_columns[] = {
{ COL_COS_VALUE, "vlan.priority" },
{ COL_CIRCUIT_ID, "iax2.call" },
{ COL_BSSGP_TLLI, "bssgp.tlli" },
{ COL_HPUX_SUBSYS, "nettl.subsys" },
{ COL_HPUX_DEVID, "nettl.devid" },
{ COL_FR_DLCI, "fr.dlci" },
{ COL_REL_CONV_TIME, "tcp.time_relative" },
{ COL_DELTA_CONV_TIME, "tcp.time_delta" },
{ COL_OXID, "fc.ox_id" },
{ COL_RXID, "fc.rx_id" },
{ COL_SRCIDX, "mdshdr.srcidx" },
{ COL_DSTIDX, "mdshdr.dstidx" },
{ COL_DCE_CTX, "dcerpc.cn_ctx_id" }
};
guint haystack_idx; guint haystack_idx;
const gchar *haystack_fmt;
gchar **fmt = (gchar **) el_data; gchar **fmt = (gchar **) el_data;
@ -3885,8 +3902,7 @@ try_convert_to_custom_column(gpointer *el_data)
haystack_idx < G_N_ELEMENTS(migrated_columns); haystack_idx < G_N_ELEMENTS(migrated_columns);
++haystack_idx) { ++haystack_idx) {
haystack_fmt = col_format_to_string(migrated_columns[haystack_idx].el); if (strcmp(migrated_columns[haystack_idx].col_fmt, *fmt) == 0) {
if (strcmp(haystack_fmt, *fmt) == 0) {
gchar *cust_col = g_strdup_printf("%%Cus:%s:0", gchar *cust_col = g_strdup_printf("%%Cus:%s:0",
migrated_columns[haystack_idx].col_expr); migrated_columns[haystack_idx].col_expr);