Ignore:
Timestamp:
09/13/07 16:51:57 (14 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:
4c1302b
Parents:
394706e
Message:

Add support for cisco hdlc over pos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r1344aa8 rdd06159  
    270270               
    271271
    272 static libtrace_linktype_t legacypos_get_link_type(const libtrace_packet_t *packet UNUSED) {
     272static libtrace_linktype_t legacypos_get_link_type(
     273                const libtrace_packet_t *packet) {
     274        /* Is this a cisco hdlc frame? */
     275        if ((((uint8_t*)packet->payload)[0] == 0x0F /* Unicast */
     276                || ((uint8_t*)packet->payload)[0] == 0x8F /* Multicast */)
     277                && ((uint8_t*)packet->payload)[1] == 0x00 /* control == 0x00 */
     278           )
     279                return TRACE_TYPE_HDLC_POS;
    273280        return TRACE_TYPE_PPP;
    274281}
    275282
    276 static libtrace_linktype_t legacyatm_get_link_type(const libtrace_packet_t *packet UNUSED) {
     283static libtrace_linktype_t legacyatm_get_link_type(
     284                const libtrace_packet_t *packet UNUSED) {
    277285        return TRACE_TYPE_ATM;
    278286}
Note: See TracChangeset for help on using the changeset viewer.