Ignore:
Timestamp:
03/15/10 16:58:28 (11 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:
4811b1e
Parents:
91c38f8
Message:
  • Correctly deal with the differences between PPP over HDLC and CHDLC - we can now decode both link headers correctly (tested against IPLS and Leipzig traces)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r238d50a r7fc0eaa2  
    349349         *      - Perry Lorier (2008-11-04)
    350350         */
     351       
     352        /* It can also be CHDLC, which is different again */
     353       
     354        /* This check matchs PPP over HDLC, a la RFC 1662 */
    351355        if (((char *)packet->payload)[0] == '\xFF'
    352356                && ((char*)packet->payload)[1] == '\x03')
    353357                return TRACE_TYPE_POS;
     358       
     359        /* This check matches unicast CHDLC */
     360        else if (((char *)packet->payload)[0] == '\x0F' &&
     361                ((char*)packet->payload)[1] == '\x00')
     362                return TRACE_TYPE_HDLC_POS;
     363       
     364        /* This check matches broadcast CHDLC */
     365        else if (((char *)packet->payload)[0] == '\x8F' &&
     366                ((char*)packet->payload)[1] == '\x00')
     367                return TRACE_TYPE_HDLC_POS;
     368
     369        /* Otherwise just assume raw PPP (?) */
    354370        else
    355371                return TRACE_TYPE_PPP;
Note: See TracChangeset for help on using the changeset viewer.