2
2
* Routines for column utilities.
4
* $Id: column-utils.c 19539 2006-10-15 06:10:59Z sahlberg $
4
* $Id: column-utils.c 20118 2006-12-11 20:24:51Z sfisher $
6
6
* Wireshark - Network traffic analyzer
7
7
* By Gerald Combs <gerald@wireshark.org>
779
779
strcpy(cinfo->col_expr_val[col],cinfo->col_buf[col]);
783
col_set_epoch_time(frame_data *fd, column_info *cinfo, int col)
786
COL_CHECK_REF_TIME(fd, cinfo, col);
788
switch(timestamp_get_precision()) {
789
case(TS_PREC_FIXED_SEC):
790
case(TS_PREC_AUTO_SEC):
791
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
792
fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000000, SECS);
794
case(TS_PREC_FIXED_DSEC):
795
case(TS_PREC_AUTO_DSEC):
796
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
797
fd->abs_ts.secs, fd->abs_ts.nsecs / 100000000, DSECS);
799
case(TS_PREC_FIXED_CSEC):
800
case(TS_PREC_AUTO_CSEC):
801
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
802
fd->abs_ts.secs, fd->abs_ts.nsecs / 10000000, CSECS);
804
case(TS_PREC_FIXED_MSEC):
805
case(TS_PREC_AUTO_MSEC):
806
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
807
fd->abs_ts.secs, fd->abs_ts.nsecs / 1000000, MSECS);
809
case(TS_PREC_FIXED_USEC):
810
case(TS_PREC_AUTO_USEC):
811
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
812
fd->abs_ts.secs, fd->abs_ts.nsecs / 1000, USECS);
814
case(TS_PREC_FIXED_NSEC):
815
case(TS_PREC_AUTO_NSEC):
816
display_epoch_time(cinfo->col_buf[col], COL_MAX_LEN,
817
fd->abs_ts.secs, fd->abs_ts.nsecs, NSECS);
820
g_assert_not_reached();
822
cinfo->col_data[col] = cinfo->col_buf[col];
823
strcpy(cinfo->col_expr[col],"frame.time_delta");
824
strcpy(cinfo->col_expr_val[col],cinfo->col_buf[col]);
782
826
/* Set the format of the variable time format.
783
827
XXX - this is called from "file.c" when the user changes the time
784
828
format they want for "command-line-specified" time; it's a bit ugly
806
850
col_set_delta_time(fd, cinfo, col);
853
col_set_epoch_time(fd, cinfo, col);
809
856
/* code is missing for this case, but I don't know which [jmayer20051219] */
1242
1289
case COL_8021Q_VLAN_ID:
1292
case COL_DSCP_VALUE: /* done by packet-ip.c */
1295
case COL_COS_VALUE: /* done by packet-vlan.c */
1298
case COL_FR_DLCI: /* done by packet-fr.c */
1299
case COL_BSSGP_TLLI: /* done by packet-bssgp.c */
1245
1302
case NUM_COL_FMTS: /* keep compiler happy - shouldn't get here */
1246
1303
g_assert_not_reached();