Ignore:
Timestamp:
06/23/17 14:24:23 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
fdf1f7b
Parents:
f398c61
Message:

Push pcap_get_direction() function to format_helper.c

This means we don't have duplicate "get direction" code
in multiple pcap-based format modules. The future addition of
pcapng will be able to use this function too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.h

    ree6e802 r633339d  
    8787                int level,
    8888                int filemode);
     89
     90
     91/** Attempts to determine the direction for a pcap (or pcapng) packet.
     92 *
     93 * @param packet        The packet in question.
     94 * @return A valid libtrace_direction_t describing the direction that the
     95 *         packet was travelling, if direction can be determined. Otherwise
     96 *         returns TRACE_DIR_UNKNOWN.
     97 *
     98 * Note that we can determine the direction for only certain types of packets
     99 * if they are captured using pcap/pcapng, specifically SLL and PFLOG captures.
     100 */
     101libtrace_direction_t pcap_get_direction(const libtrace_packet_t *packet);
     102
     103
     104
    89105#endif /* FORMAT_HELPER_H */
Note: See TracChangeset for help on using the changeset viewer.