Ignore:
Timestamp:
10/14/08 16:07:22 (13 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:
530cef6
Parents:
5c4e0c0
Message:

Change detection of lagacypos traces to HDLC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r87d7ab9 r8babb98  
    311311static libtrace_linktype_t legacypos_get_link_type(
    312312                const libtrace_packet_t *packet) {
    313         /* Is this a cisco hdlc frame? */
    314         if ((((uint8_t*)packet->payload)[0] == 0x0F /* Unicast */
    315                 || ((uint8_t*)packet->payload)[0] == 0x8F /* Multicast */)
    316                 && ((uint8_t*)packet->payload)[1] == 0x00 /* control == 0x00 */
    317            )
    318                 return TRACE_TYPE_HDLC_POS;
    319         return TRACE_TYPE_PPP;
     313        /* This code used to look for (0x0F|0x8F 0x00) frames
     314         * and return TRACE_TYPE_HDLC_POS, otherwise return PPP.
     315         * However the PPP frames were being decoded using HDLC_POS semantics
     316         * so when we fixed PPP, this all broke.  I've changed this to always
     317         * assume HDLC_POS.  If we ever find a trace that does raw PPP over
     318         * HDLC_POS then this should be changed to detect that it's PPP and
     319         * do the right thing.  I suspect this is due to an original confusion
     320         * as to how exactly POS works.
     321         *  -- Perry Lorier (2008-10-14)
     322         */
     323        return TRACE_TYPE_HDLC_POS;
    320324}
    321325
Note: See TracChangeset for help on using the changeset viewer.