Changeset 4d5a9a7


Ignore:
Timestamp:
08/12/05 10:56:50 (15 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2b58b60
Parents:
ffc8c8d
Message:

Just adding trace_get_format for use with wdcap2 output module

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    rffc8c8d r4d5a9a7  
    198198void trace_help();
    199199
     200/** Gets the output format for a given output trace
     201 *
     202 */
     203char *trace_get_output_format(struct libtrace_out_t *libtrace);
     204
    200205/** Prints error information
    201206 *
  • lib/trace.c

    rffc8c8d r4d5a9a7  
    187187                       
    188188                default:
    189                         fprintf(stderr, "Unkown errcode %d\n",trace_err.err_num);
     189                        fprintf(stderr, "Unknown errcode %d\n",trace_err.err_num);
    190190                        break; 
    191191        }
     
    196196#define URI_PROTO_LINE 16
    197197
    198 
     198/** Gets the name of the output format for a given output trace.
     199 *
     200 * @params libtrace     the output trace to get the name of the format for
     201 * @returns the output format
     202 *
     203 */
     204char *trace_get_output_format(struct libtrace_out_t *libtrace) {
     205        char * format = libtrace->format->name;
     206
     207        return format;
     208}
    199209
    200210/** Create a trace file from a URI
     
    388398       
    389399        if (!options) {
    390                 printf("No options specified\n");
    391400                return 0;
    392401        }
Note: See TracChangeset for help on using the changeset viewer.