Changeset 9bc4689 for lib/libtrace.h.in


Ignore:
Timestamp:
09/06/07 01:07:07 (14 years ago)
Author:
Perry Lorier <perry@…>
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:
fbc4342
Parents:
180f095
Message:

Move everything over to using the newer API's

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r180f095 r9bc4689  
    397397    int16_t  ip_id;                     /**< Identification */
    398398#if BYTE_ORDER == LITTLE_ENDIAN
    399     LT_BITFIELD16 ip_off:12;            /**< Fragment Offset */
     399    LT_BITFIELD16 ip_off:13;            /**< Fragment Offset */
    400400    LT_BITFIELD16 ip_mf:1;              /**< More Fragments Flag */
    401401    LT_BITFIELD16 ip_df:1;              /**< Dont Fragment Flag */
     
    405405    LT_BITFIELD16 ip_df:1;              /**< More Fragments Flag */
    406406    LT_BITFIELD16 ip_mf:1;              /**< Dont Fragment Flag */
    407     LT_BITFIELD16 ip_off:12;            /**< Reserved Fragment Flag */
     407    LT_BITFIELD16 ip_off:13;            /**< Reserved Fragment Flag */
    408408#else
    409409#   error "Adjust your <bits/endian.h> defines"
     
    10631063                uint32_t *remaining);
    10641064
     1065/** Gets a pointer to the next header given a pointer to a layer2 header
     1066 *
     1067 * @param l2                    The pointer to the current layer2 header
     1068 * @param linktype              The type of the layer2 header
     1069 * @param[out] ethertype        An optional output variable of the ethernet type
     1070 * @param[in,out] remaining     Optionally updated with the length remaining
     1071 *
     1072 * @return a pointer to the transport layer header, or NULL if header isn't
     1073 * present.
     1074 *
     1075 * type may be NULL if not needed.
     1076 *
     1077 * Remaining may be NULL.  If Remaining is not NULL it must point to the number
     1078 * of bytes captured of the layer2 header and beyond.  It will be updated after
     1079 * this function to the number of bytes remaining after the layer2 header
     1080 * was removed.
     1081 *
     1082 */
     1083DLLEXPORT void *trace_get_payload_from_layer2(void *l2,
     1084                libtrace_linktype_t linktype,
     1085                uint16_t *ethertype,
     1086                uint32_t *remaining);
     1087
     1088
    10651089/** Get a pointer to the layer 3 header.
    10661090 * @param packet                The packet opaque pointer
     
    10741098 */
    10751099DLLEXPORT SIMPLE_FUNCTION
    1076 void *trace_get_layer3(libtrace_packet_t *packet,
     1100void *trace_get_layer3(const libtrace_packet_t *packet,
    10771101                uint16_t *ethertype, uint32_t *remaining);
    10781102
     
    10851109 * @note proto may be NULL if proto is unneeded.
    10861110 */
    1087 DLLEXPORT void *trace_get_transport(libtrace_packet_t *packet, uint8_t *proto,
     1111DLLEXPORT void *trace_get_transport(const libtrace_packet_t *packet, uint8_t *proto,
    10881112                uint32_t *remaining);
    10891113
     
    14261450 */
    14271451DLLEXPORT SIMPLE_FUNCTION
    1428 size_t trace_get_capture_length(libtrace_packet_t *packet);
     1452size_t trace_get_capture_length(const libtrace_packet_t *packet);
    14291453
    14301454/** Get the size of the packet as it was seen on the wire.
Note: See TracChangeset for help on using the changeset viewer.