Changeset 1194


Ignore:
Timestamp:
04/21/07 15:58:06 (6 years ago)
Author:
perry
Message:

Add support for the fr+ trace format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_tsh.c

    • Property svn:keywords set to Author Date Id Revision
    r1175 r1194  
    2424 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2525 * 
    26  * $Id: format_erf.c 1163 2007-03-23 04:41:03Z perry $ 
     26 * $Id$ 
    2727 * 
    2828 */ 
     
    180180 
    181181static void tsh_help(void) { 
    182         printf("tsh format module: $Revision: 1163 $\n"); 
     182        printf("tsh format module: $Revision$\n"); 
    183183        printf("Supported input URIs:\n"); 
    184184        printf("\ttsh:/path/to/file\t(uncompressed)\n"); 
     
    193193static struct libtrace_format_t tshformat = { 
    194194        "tsh", 
    195         "$Id: format_erf.c 1163 2007-03-23 04:41:03Z perry $", 
     195        "$Id$", 
    196196        TRACE_FORMAT_TSH, 
    197197        tsh_init_input,                 /* init_input */         
     
    226226}; 
    227227 
     228/* the tsh header format is the same as tsh, except that the bits that will 
     229 * always be "0" in the fr+ format are used for an "interface" identifier, 
     230 * thus on tr+ traces, this will always be 0.  So, we use the exact same 
     231 * decoder for both traces. 
     232 */ 
     233static struct libtrace_format_t frplusformat = { 
     234        "fr+", 
     235        "$Id$", 
     236        TRACE_FORMAT_TSH, 
     237        tsh_init_input,                 /* init_input */         
     238        NULL,                           /* config_input */ 
     239        tsh_start_input,                /* start_input */ 
     240        NULL,                           /* pause_input */ 
     241        NULL,                           /* init_output */ 
     242        NULL,                           /* config_output */ 
     243        NULL,                           /* start_output */ 
     244        tsh_fin_input,                  /* fin_input */ 
     245        NULL,                           /* fin_output */ 
     246        tsh_read_packet,                /* read_packet */ 
     247        NULL,                           /* fin_packet */ 
     248        NULL,                           /* write_packet */ 
     249        tsh_get_link_type,              /* get_link_type */ 
     250        tsh_get_direction,              /* get_direction */ 
     251        NULL,                           /* set_direction */ 
     252        NULL,                           /* get_erf_timestamp */ 
     253        tsh_get_timeval,                /* get_timeval */ 
     254        NULL,                           /* get_seconds */ 
     255        NULL,                           /* seek_erf */ 
     256        NULL,                           /* seek_timeval */ 
     257        NULL,                           /* seek_seconds */ 
     258        tsh_get_capture_length,         /* get_capture_length */ 
     259        tsh_get_wire_length,            /* get_wire_length */ 
     260        tsh_get_framing_length,         /* get_framing_length */ 
     261        NULL,                           /* set_capture_length */ 
     262        NULL,                           /* get_fd */ 
     263        trace_event_trace,              /* trace_event */ 
     264        tsh_help,                       /* help */ 
     265        NULL                            /* next pointer */ 
     266}; 
    228267 
    229268void tsh_constructor(void) { 
    230269        register_format(&tshformat); 
    231 } 
     270        register_format(&frplusformat); 
     271} 
Note: See TracChangeset for help on using the changeset viewer.