Changeset 530cef6 for lib/protocols_l2.c


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/protocols_l2.c

    r11c0f44 r530cef6  
    3131 * type is input/output
    3232 */
    33 void *trace_get_vlan_payload_from_ethernet_payload(void *ethernet, uint16_t *type,
     33void *trace_get_payload_from_vlan(void *ethernet, uint16_t *type,
    3434                uint32_t *remaining)
    3535{
     
    5050
    5151                return (void*)((char *)ethernet + sizeof(*vlanhdr));
    52         }
    53 
    54         return ethernet;
     52        } else
     53                return NULL;
     54
    5555}
    5656
     
    5959 * return a type of 0x0000.
    6060 */
    61 void *trace_get_mpls_payload_from_ethernet_payload(void *ethernet,
    62                 uint16_t *type, uint32_t *remaining)
     61void *trace_get_payload_from_mpls(void *ethernet, uint16_t *type,
     62                uint32_t *remaining)
    6363{
    6464        assert(type != NULL);
Note: See TracChangeset for help on using the changeset viewer.