Changeset a48d246 for lib


Ignore:
Timestamp:
11/11/04 12:30:19 (17 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
c8a66cb
Parents:
80a2e99
Message:

truncation issue fixed

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.am

    rb36a3b7 ra48d246  
    44libtrace_la_CFLAGS = @ADD_INCLS@
    55libtrace_la_LIBADD = @ADD_LIBS@
    6 libtrace_la_LDFLAGS=-version-info 2:7:0 @ADD_LDFLAGS@
     6libtrace_la_LDFLAGS=-version-info 2:8:0 @ADD_LDFLAGS@
  • lib/Makefile.in

    rb36a3b7 ra48d246  
    8787libtrace_la_CFLAGS = @ADD_INCLS@
    8888libtrace_la_LIBADD = @ADD_LIBS@
    89 libtrace_la_LDFLAGS = -version-info 2:7:0 @ADD_LDFLAGS@
     89libtrace_la_LDFLAGS = -version-info 2:8:0 @ADD_LDFLAGS@
    9090subdir = lib
    9191mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  • lib/trace.c

    r80a2e99 ra48d246  
    14761476 * @returns the new length of the packet, or the original length of the
    14771477 * packet if unchanged
     1478 * NOTE: len refers to the network-level payload of the packet, and not
     1479 * any capture headers included as well. For example, to truncate a packet
     1480 * after the IP header, set scan to sizeof(ethernet_header) + sizeof(ip_header)
    14781481 * @author Daniel Lawson
    14791482 */
     
    14921495                case PCAP:
    14931496                        pcaphdr = (struct pcap_pkthdr *)packet->buffer;
    1494                         pcaphdr->caplen = size;
    1495                         packet->size = size;
     1497                        pcaphdr->caplen = size + sizeof(struct pcap_pkthdr);
     1498                        packet->size = pcaphdr->caplen;
    14961499                        break;
    14971500                case ERF:
     
    14991502                case RTCLIENT:
    15001503                        erfptr = (dag_record_t *)packet->buffer;
    1501                         erfptr->rlen = ntohs(size);
    1502                         packet->size = size;
     1504                        erfptr->rlen = ntohs(size + sizeof(dag_record_t));
     1505                        packet->size = size + sizeof(dag_record_t);
    15031506                        break;
    15041507                case WAGINT:
Note: See TracChangeset for help on using the changeset viewer.