Changeset ef5ba20 for lib/libtrace.h.in


Ignore:
Timestamp:
01/16/19 13:52:38 (2 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
d51e5d0
Parents:
629b19b
Message:

add abilty to get custom option from meta packets, add abilty to get entire section from meta packet, meta api now returns libtrace_meta_t structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    re7132d6 ref5ba20  
    586586} libtrace_meta_result_t;
    587587
     588typedef struct libtrace_meta_section_item {
     589        uint16_t option;
     590        uint16_t len;
     591        uint8_t data_type;
     592        void *data;
     593} libtrace_meta_item_t;
     594
     595typedef struct libtrace_meta_section {
     596        uint16_t section;
     597        uint16_t num;
     598        libtrace_meta_item_t *items;
     599} libtrace_meta_t;
     600
    588601typedef struct libtrace_meta {
    589602        char *interface_name;           /**< Interface name packet was captured on */
     
    599612        char *interface_comment;        /**< Interface comment */
    600613        char *capture_application;      /**< Name of the capturing application */
    601 } libtrace_meta_t;
     614} libtrace_meta_tt;
    602615
    603616typedef struct libtrace_packet_cache {
     
    638651        int which_trace_start;          /**< Used to match packet to a started instance of the parent trace */
    639652
    640         libtrace_meta_t meta;           /**< Meta data for the packet */
     653        libtrace_meta_tt meta;           /**< Meta data for the packet */
    641654} libtrace_packet_t;
    642655
     
    37203733#endif /* #ifdef __cplusplus */
    37213734
    3722 char *trace_get_interface_name(libtrace_packet_t *packet);
    3723 void *trace_get_interface_mac(libtrace_packet_t *packet);
    3724 uint64_t *trace_get_interface_speed(libtrace_packet_t *packet);
    3725 uint32_t *trace_get_interface_ip4(libtrace_packet_t *packet);
    3726 uint32_t *trace_get_interface_ipv4(libtrace_packet_t *packet);
    3727 void *trace_get_interface_ip6(libtrace_packet_t *packet);
    3728 void *trace_get_interface_ipv6(libtrace_packet_t *packet);
    3729 char *trace_get_interface_description(libtrace_packet_t *packet);
    3730 uint32_t *trace_get_interface_num(libtrace_packet_t *packet);
    3731 char *trace_get_host_os(libtrace_packet_t *packet);
    3732 uint32_t *trace_get_interface_frame_check_sequence_length(libtrace_packet_t *packet);
    3733 char *trace_get_interface_hardware_description(libtrace_packet_t *packet);
    3734 char *trace_get_interface_comment(libtrace_packet_t *packet);
    3735 char *trace_get_capture_application(libtrace_packet_t *packet);
     3735int trace_destroy_meta(libtrace_meta_t *result);
     3736libtrace_meta_t *trace_get_interface_name(libtrace_packet_t *packet);
     3737libtrace_meta_t *trace_get_interface_mac(libtrace_packet_t *packet);
     3738libtrace_meta_t *trace_get_interface_speed(libtrace_packet_t *packet);
     3739libtrace_meta_t *trace_get_interface_ip4(libtrace_packet_t *packet);
     3740libtrace_meta_t *trace_get_interface_ipv4(libtrace_packet_t *packet);
     3741libtrace_meta_t *trace_get_interface_ip6(libtrace_packet_t *packet);
     3742libtrace_meta_t *trace_get_interface_ipv6(libtrace_packet_t *packet);
     3743libtrace_meta_t *trace_get_interface_description(libtrace_packet_t *packet);
     3744libtrace_meta_t *trace_get_interface_num(libtrace_packet_t *packet);
     3745libtrace_meta_t *trace_get_host_os(libtrace_packet_t *packet);
     3746libtrace_meta_t *trace_get_interface_frame_check_sequence_length(libtrace_packet_t *packet);
     3747libtrace_meta_t *trace_get_interface_hardware_description(libtrace_packet_t *packet);
     3748libtrace_meta_t *trace_get_interface_comment(libtrace_packet_t *packet);
     3749libtrace_meta_t *trace_get_capture_application(libtrace_packet_t *packet);
     3750libtrace_meta_t *trace_get_section_item(libtrace_packet_t *packet, uint32_t section_code,
     3751        uint16_t option_code);
     3752libtrace_meta_t *trace_get_section(libtrace_packet_t *packet, uint32_t section_code);
    37363753
    37373754#endif /* LIBTRACE_H_ */
Note: See TracChangeset for help on using the changeset viewer.