Changeset b778083


Ignore:
Timestamp:
03/20/07 15:11:07 (14 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:
2fbcb26
Parents:
0fd4ad6
Message:

Added a new RT packet type for transmitting trace meta-data

Location:
lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.am

    r5e85c23 rb778083  
    3838                libtrace_int.h lt_inttypes.h \
    3939                linktypes.c protocols.c libtraceio.h link_wireless.c \
    40                 $(DAGSOURCE) format_erf.h
     40                $(DAGSOURCE) format_erf.h 
    4141
    4242if DAG2_4
  • lib/format_rt.c

    ra1b899f rb778083  
    542542                switch(packet->type) {
    543543                        case TRACE_RT_STATUS:
     544                        case TRACE_RT_METADATA:
    544545                                if (rt_read(libtrace, &packet->buffer,
    545546                                        (size_t)RT_INFO->rt_hdr.length,
     
    599600
    600601static int rt_get_capture_length(const libtrace_packet_t *packet) {
     602        rt_metadata_t *rt_md_hdr;
    601603        switch (packet->type) {
    602604                case TRACE_RT_STATUS:
     
    628630                case TRACE_RT_CLIENTDROP:
    629631                        return 0;
     632                case TRACE_RT_METADATA:
     633                        /* This is a little trickier to work out */
     634                        rt_md_hdr = (rt_metadata_t *)packet->buffer;
     635                        return rt_md_hdr->label_len + rt_md_hdr->value_len;
    630636                default:
    631637                        printf("Unknown type: %d\n", packet->type);
  • lib/libtrace.h.in

    r0fd4ad6 rb778083  
    278278        TRACE_RT_SERVERSTART    =16,/**< Server has been restarted */
    279279        TRACE_RT_CLIENTDROP     =17,/**< Reliable client was lost */
     280        TRACE_RT_METADATA       =18,/**< Packet contains server meta-data */
    280281
    281282        TRACE_RT_DATA_SIMPLE    = 1000, /**< Trace types that know their link
  • lib/rt_protocol.h

    rcab58c5 rb778083  
    125125} rt_keychange_t;
    126126#endif
     127
     128typedef struct rt_metadata {
     129        uint32_t label_len;
     130        uint32_t value_len;
     131} rt_metadata_t ;
    127132
    128133/** Specifications of duck structures - duck2_4 and duck2_5 match Endace's
Note: See TracChangeset for help on using the changeset viewer.