Changeset 4e5a51f for lib/format_erf.c


Ignore:
Timestamp:
02/07/19 14:07:07 (20 months ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
5cdb37d
Parents:
58c226e
git-author:
Jacob Van Walraven <jcv9@…> (02/07/19 14:00:51)
git-committer:
Jacob Van Walraven <jcv9@…> (02/07/19 14:07:07)
Message:

Structs mapped directly to a packet/file are now packed.
Replaced hardcoded value 27 with ERF_META_TYPE.
PCAPNG meta packets are still processed when DISCARD_META config is set in order to update the trace state, however the meta callback will not be called.
Removed INET_ADDRSTRLEN definitions and used ones provided by the standard headers.
Replaced %u, %lu in libpacketdump linktypes 21 and 23 with PRIu8, PRIu32 etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    r6f6fcbb r4e5a51f  
    10751075}
    10761076
    1077 /* An ERF provenance packet can contain multiple sections of the same type per packet,
    1078  * Need to think of a way to handle this currently the first found is returned*/
     1077/* An ERF provenance packet can contain multiple sections of the same type per packet */
    10791078void *erf_get_meta_section(libtrace_packet_t *packet, uint32_t section) {
    10801079
     
    10961095
    10971096        /* ensure this packet is a meta packet */
    1098         if ((hdr->type & 127) != 27) { return NULL; }
     1097        if ((hdr->type & 127) != ERF_META_TYPE) { return NULL; }
    10991098        /* set remaining to size of packet minus header length */
    11001099        remaining = ntohs(hdr->rlen) - 24;
Note: See TracChangeset for help on using the changeset viewer.