Ignore:
Timestamp:
05/04/06 17:05:13 (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:
bc4c11e
Parents:
48a20e3
Message:

Fixed memory leak in trace_event_trace
Wrote an example using the event framework
Removed old event examples
Updated format_pcapfile to use libtrace_direction_t
erf_read_packet now checks that malloc()ing a buffer actually succeeds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    re6d963c r5eeba76  
    216216}
    217217
    218 static int8_t pcapfile_get_direction(const libtrace_packet_t *packet)
    219 {
    220         int8_t direction  = -1;
     218static libtrace_direction_t pcapfile_get_direction(const libtrace_packet_t *packet)
     219{
     220        libtrace_direction_t direction  = -1;
    221221        switch(pcapfile_get_link_type(packet)) {
    222222                case TRACE_TYPE_LINUX_SLL:
     
    242242                         */
    243243                        if (ntohs(sll->pkttype == 0)) {
    244                                 direction = 1;
     244                                direction = TRACE_DIR_INCOMING;
    245245                        } else {
    246                                 direction = 0;
     246                                direction = TRACE_DIR_OUTGOING;
    247247                        }
    248248                        break;
     
    262262                        if (ntohs(pflog->dir==0)) {
    263263
    264                                 direction = 1;
     264                                direction = TRACE_DIR_INCOMING;
    265265                        }
    266266                        else {
    267                                 direction = 0;
     267                                direction = TRACE_DIR_OUTGOING;
    268268                        }
    269269                        break;
Note: See TracChangeset for help on using the changeset viewer.