Changeset b778083 for lib/format_rt.c


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.