Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r7a529a9 rd1af45d  
    10201020        struct pollfd pollset; 
    10211021        int ret;
     1022        unsigned int snaplen;
    10221023       
    10231024        ring_release_frame(libtrace, packet);
     
    10481049
    10491050        packet->buffer = header;
     1051
     1052        /* If a snaplen was configured, automatically truncate the packet to
     1053         * the desired length.
     1054         */
     1055        snaplen=LIBTRACE_MIN(
     1056                        (int)LIBTRACE_PACKET_BUFSIZE-(int)sizeof(*header),
     1057                        (int)FORMAT(libtrace->format_data)->snaplen);
     1058       
     1059        TO_TP_HDR(packet->buffer)->tp_snaplen = LIBTRACE_MIN((unsigned int)snaplen, TO_TP_HDR(packet->buffer)->tp_len);
    10501060
    10511061        /* Move to next buffer */
Note: See TracChangeset for help on using the changeset viewer.