Changeset c5ac872 for lib/format_duck.c


Ignore:
Timestamp:
02/05/15 14:07:27 (6 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
1bad1e2
Parents:
3440627
Message:

Fixed compile error when using DAG 5.2 libraries

The name of the ioctl to fetch DUCK information had changed in DAG version 5
and the old one no longer worked.

Fixed bug where reading from a DAG card using trace_event would not
produce DUCK packets, even if the user requested them.

Added support for the new DUCK format present in DAG version 5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_duck.c

    r9b097ea rc5ac872  
    216216                duck_size = sizeof(duck2_5_t);
    217217                packet->type = TRACE_RT_DUCK_2_5;
     218        } else if (DATA(libtrace)->dag_version == TRACE_RT_DUCK_5_0) {
     219                duck_size = sizeof(duck5_0_t);
     220                packet->type = TRACE_RT_DUCK_5_0;
    218221        } else {
    219222                trace_set_err(libtrace, TRACE_ERR_BAD_PACKET,
     
    252255
    253256        if (packet->type != TRACE_RT_DUCK_2_4
    254                         && packet->type != TRACE_RT_DUCK_2_5) {
     257                        && packet->type != TRACE_RT_DUCK_2_5 &&
     258                        packet->type != TRACE_RT_DUCK_5_0) {
    255259                trace_set_err_out(libtrace, TRACE_ERR_BAD_PACKET,
    256260                                "Only DUCK packets may be written to a DUCK file");
     
    287291                case TRACE_RT_DUCK_2_5:
    288292                        return sizeof(duck2_5_t);
     293                case TRACE_RT_DUCK_5_0:
     294                        return sizeof(duck5_0_t);
    289295                default:
    290296                        trace_set_err(packet->trace,TRACE_ERR_BAD_PACKET,
Note: See TracChangeset for help on using the changeset viewer.