Changeset 530cef6 for lib/libtrace.h.in


Ignore:
Timestamp:
10/24/08 09:58:02 (13 years ago)
Author:
Shane Alcock <salcock@…>
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:
4ba74cc
Parents:
8babb98
Message:
  • Renamed hideous get_*_payload_from_ethernet_payload API functions to match the get_payload_from_* naming convention
  • trace_get_payload_from_vlan now returns NULL if passed something other than a vlan header or there is no header present after the vlan header, instead of returning the original header that was passed in
  • trace_get_payload_from_ip* functions now check if the ip header passed in is NULL and return NULL appropriately
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r11c0f44 r530cef6  
    12191219
    12201220/** Skips over any 802.1q headers, if present.
    1221  * @param ethernet      A pointer to the payload following an ethernet header
    1222  * -usually the result of calling trace_get_payload_from_link
     1221 * @param vlan      A pointer to the vlan header
    12231222 * @param[in,out] type  The ethernet type, replaced with the vlan ether type
    12241223 * @param[in,out] remaining Updated with the number of bytes remaining
    12251224 *
    12261225 * @return a pointer to the header beyond the vlan header, if present.
    1227  * Otherwise, returns the ethernet payload that was passed in
     1226 * Otherwise, returns NULL
    12281227 *
    12291228 * Remaining may be NULL. If Remaining is not NULL it must point to the number
     
    12351234 *
    12361235 */
    1237 DLLEXPORT void *trace_get_vlan_payload_from_ethernet_payload(
    1238                 void *ethernet_payload, uint16_t *type, uint32_t *remaining);
     1236DLLEXPORT void *trace_get_payload_from_vlan(
     1237                void *vlan, uint16_t *type, uint32_t *remaining);
    12391238
    12401239/** Skips over any MPLS headers, if present.
    1241  * @param ethernet_payload      A pointer to the payload following an ethernet
    1242  * header - usually the result of calling trace_get_payload_from_link
     1240 * @param mpls      A pointer to the mpls header
    12431241 * @param[in,out] type  The ethernet type, replaced by the ether type of the
    12441242 * following header - 0x0000 if an Ethernet header is deemed to be next
     
    12611259 *
    12621260 */
    1263 DLLEXPORT void *trace_get_mpls_payload_from_ethernet_payload(
    1264                 void *ethernet_payload, uint16_t *type, uint32_t *remaining);
     1261DLLEXPORT void *trace_get_payload_from_mpls(
     1262                void *mpls, uint16_t *type, uint32_t *remaining);
    12651263
    12661264/** Gets a pointer to the payload given a pointer to a tcp header
Note: See TracChangeset for help on using the changeset viewer.