Changeset 4631115 for lib/libtrace.h.in


Ignore:
Timestamp:
02/13/15 13:23:34 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
de74f88
Parents:
0b01fea (diff), 92d5f15 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into develop.

Update to include fixes/features etc from the 3.0.22 release.

Conflicts:

README
lib/format_dag25.c
lib/format_dpdk.c
lib/format_linux.c
lib/trace.c
test/Makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r97d170d r4631115  
    402402        TRACE_RT_CLIENTDROP     =17,/**< Reliable client was lost */
    403403        TRACE_RT_METADATA       =18,/**< Packet contains server meta-data */
     404        TRACE_RT_DUCK_5_0       =19,/**< Dag 5.0 Duck */
    404405
    405406        /** Not actually used - all DATA types begin from this value */
     
    832833} PACKED libtrace_pppoe_t;
    833834
     835/** Libtrace local definition of GRE (Generalised Routing Protocol) header
     836 * RFC2890
     837 */
     838typedef struct libtrace_gre_t
     839{
     840    uint16_t flags;         /**< Flags and version */
     841    uint16_t ethertype;     /**< Payload ethertype */
     842    uint16_t checksum;      /**< Optional checksum */
     843    uint16_t reserved1;     /**< Optional reserved */
     844    uint16_t key;           /**< Optional key (or Tenant Network ID) */
     845    uint16_t seq;           /**< Optional sequence number */
     846} PACKED libtrace_gre_t;
     847
     848#define LIBTRACE_GRE_FLAG_CHECKSUM 0x8000
     849#define LIBTRACE_GRE_FLAG_KEY      0x2000
     850#define LIBTRACE_GRE_FLAG_SEQ      0x1000
     851#define LIBTRACE_GRE_FLAG_VERMASK  0x0007
     852
     853/** Libtrace local definition of VXLAN Header
     854 * (draft-mahalingam-dutt-dcops-vxlan)
     855 */
     856typedef struct libtrace_vxlan_t
     857{
     858    uint8_t flags;          /**< Flags */
     859    uint8_t reserved1[3];   /**< Reserved */
     860    uint8_t vni[3];         /**< VXLAN Network Identifier (VNI) */
     861    uint8_t reserved2;
     862} PACKED libtrace_vxlan_t;
     863
    834864/** 802.11 header */
    835865typedef struct libtrace_80211_t {
     
    20942124DLLEXPORT void *trace_get_payload_from_icmp6(libtrace_icmp6_t *icmp,
    20952125                uint32_t *remaining);
     2126
     2127/** Gets a pointer to the payload following a GRE header
     2128 * @param         gre       A pointer to the beginning of the GRE header.
     2129 * @param[in,out] remaining Updated with the number of captured bytes remaining.
     2130 *
     2131 * @return A pointer to the GRE payload, or NULL if the GRE header is truncated.
     2132 *
     2133 * When calling this function, remaining must contain the number of captured
     2134 * bytes remaining in the packet starting from the GRE header (including the
     2135 * GRE header itself). remaining will be updated to contain the number of
     2136 * bytes remaining after the GRE header has been skipped.
     2137 *
     2138 * If the GRE header is complete but there are zero bytes of payload after
     2139 * the header, a pointer to where the payload would be is returned and
     2140 * remaining will be set to 0.  If the GRE header is incomplete, NULL will be
     2141 * returned and remaining will be set to 0. Therefore, it is important to check
     2142 * the value of remaining after calling this function.
     2143 */
     2144DLLEXPORT void *trace_get_payload_from_gre(libtrace_gre_t *gre,
     2145                uint32_t *remaining);
     2146
     2147/** Gets a pointer to the payload following a VXLAN header
     2148 * @param         udp       A pointer to the beginning of the UDP header.
     2149 * @param[in,out] remaining Updated with the number of captured bytes remaining.
     2150 *
     2151 * @return A pointer to the beginning of the VXLAN header, or NULL if the UDP
     2152 * header is truncated, or this is not a VXLAN packet.
     2153 *
     2154 */
     2155DLLEXPORT libtrace_vxlan_t *trace_get_vxlan_from_udp(libtrace_udp_t *udp,
     2156                uint32_t *remaining);
     2157
     2158/** Gets a pointer to the payload following a VXLAN header
     2159 * @param         vxlan       A pointer to the beginning of the VXLAN header.
     2160 * @param[in,out] remaining Updated with the number of captured bytes remaining.
     2161 *
     2162 * @return A pointer to the VXLAN payload, or NULL if the VXLAN header is
     2163 * truncated.
     2164 *
     2165 * When calling this function, remaining must contain the number of captured
     2166 * bytes remaining in the packet starting from the VXLAN header (including the
     2167 * VXLAN header itself). remaining will be updated to contain the number of
     2168 * bytes remaining after the VXLAN header has been skipped.
     2169 *
     2170 * If the VXLAN header is complete but there are zero bytes of payload after
     2171 * the header, a pointer to where the payload would be is returned and
     2172 * remaining will be set to 0.  If the VXLAN header is incomplete, NULL will be
     2173 * returned and remaining will be set to 0. Therefore, it is important to check
     2174 * the value of remaining after calling this function.
     2175 */
     2176DLLEXPORT void *trace_get_payload_from_vxlan(libtrace_vxlan_t *vxlan,
     2177                uint32_t *remaining);
    20962178
    20972179/** Get a pointer to the TCP header (if present)
Note: See TracChangeset for help on using the changeset viewer.