Changeset c95b923


Ignore:
Timestamp:
10/20/05 18:30:41 (15 years ago)
Author:
Jamie Curtis <jamie@…>
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:
194d49b
Parents:
fe7b292
Message:

Tided documentation and changed truncate_packet references

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_int.h

    r31709e8d rc95b923  
    164164        int (*get_capture_length)(const struct libtrace_packet_t *packet);
    165165        int (*get_wire_length)(const struct libtrace_packet_t *packet);
    166         size_t (*truncate_packet)(struct libtrace_packet_t *packet,size_t size);
     166        size_t (*set_capture_length)(struct libtrace_packet_t *packet,size_t size);
    167167        int (*get_fd)(const struct libtrace_packet_t *packet);
    168168        struct libtrace_eventobj_t (*trace_event)(struct libtrace_t *trace, struct libtrace_packet_t *packet); 
  • lib/trace.c

    rfe7b292 rc95b923  
    13471347 * @param size          the new length of the packet
    13481348 * @returns the new size of the packet
    1349  *
    1350  * NOTE: size and the return size refer to the network-level payload of the packet, and not
    1351  * any capture headers included as well. For example, to truncate a packet
    1352  * after the IP header, set size to sizeof(ethernet_header) + sizeof(ip_header)
    1353  *
    1354  * If the original network-level payload is smaller than size, then
    1355  * the original size is returned and the packet is left unchanged.
    1356  *
     1349 * @note size and the return size refer to the network-level payload of the
     1350 * packet, and do not include any capture headers. For example, to truncate a
     1351 * packet after the IP header, set size to sizeof(ethernet_header) +
     1352 * sizeof(ip_header)
     1353 * @note If the original network-level payload is smaller than size, then the
     1354 * original size is returned and the packet is left unchanged.
    13571355 * @author Daniel Lawson
    13581356 */
     
    13601358        assert(packet);
    13611359
    1362         if (packet->trace->format->truncate_packet) {
    1363                 return packet->trace->format->truncate_packet(packet,size);
     1360        if (packet->trace->format->set_capture_length) {
     1361                return packet->trace->format->set_capture_length(packet,size);
    13641362        }
    13651363
Note: See TracChangeset for help on using the changeset viewer.