Changeset ae8ec56 for lib/libtrace.h.in


Ignore:
Timestamp:
05/08/08 17:06:50 (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:
35782f6
Parents:
1f44884
Message:
  • Made trace_get_mpls_payload_from_ethernet_payload available via the API
  • Added assert to trace_get_vlan_payload_from_ethernet_payload so that its behaviour matches the documentation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r007fb43 rae8ec56  
    12241224                void *ethernet_payload, uint16_t *type, uint32_t *remaining);
    12251225
     1226/** Skips over any MPLS headers, if present.
     1227 * @param ethernet_payload      A pointer to the payload following an ethernet
     1228 * header - usually the result of calling trace_get_payload_from_link
     1229 * @param[in,out] type  The ethernet type, replaced by the ether type of the
     1230 * following header - 0x0000 if an Ethernet header is deemed to be next
     1231 * @param[in,out] remaining     Updated with the number of bytes remaining
     1232 *
     1233 * @return a pointer to the header beyond the MPLS label, if present. Will
     1234 * return NULL if there is not enough bytes remaining to skip past the MPLS
     1235 * label or if the ether type is not MPLS.
     1236 *
     1237 * Remaining may be NULL. If remaining is not NULL it must point to the number
     1238 * of bytes captured past (but not including) the link layer. This function
     1239 * will decrement it by the length of the topmost MPLS label if present.
     1240 *
     1241 * Type must point to the value of the ethernet type. Libtrace will assert
     1242 * fail if type is NULL.
     1243 *
     1244 * NOTE that this function will only remove one MPLS label at a time - the type
     1245 * will be set to 0x8847 if there is another MPLS label after the one
     1246 * removed by this function.
     1247 *
     1248 */
     1249DLLEXPORT void *trace_get_mpls_payload_from_ethernet_payload(
     1250                void *ethernet_payload, uint16_t *type, uint32_t *remaining);
     1251
    12261252/** Gets a pointer to the payload given a pointer to a tcp header
    12271253 * @param tcp           The tcp Header
Note: See TracChangeset for help on using the changeset viewer.