Show
Ignore:
Timestamp:
10/24/07 09:43:03 (15 months ago)
Author:
aturner
Message:

fix gcc compile error for certain versions. refs #268

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/tcpedit/plugins/dlt_en10mb/en10mb.c

    r1911 r1916  
    304304     
    305305    /* get the L3 protocol type  & L2 len*/ 
    306     switch (eth->ether_type) { 
    307         case htons(ETHERTYPE_VLAN): 
     306    switch (ntohs(eth->ether_type)) { 
     307        case ETHERTYPE_VLAN: 
    308308            vlan = (struct tcpr_802_1q_hdr *)packet; 
    309309            ctx->proto = vlan->vlan_len; 
     
    518518     
    519519    eth = (struct tcpr_ethernet_hdr *)packet; 
    520     switch (eth->ether_type) { 
    521         case htons(ETHERTYPE_VLAN): 
     520    switch (ntohs(eth->ether_type)) { 
     521        case ETHERTYPE_VLAN: 
    522522            vlan = (struct tcpr_802_1q_hdr *)packet; 
    523523            return vlan->vlan_len; 
     
    609609     
    610610    eth = (struct tcpr_ethernet_hdr *)packet; 
    611     switch (eth->ether_type) { 
    612         case htons(ETHERTYPE_VLAN): 
     611    switch (ntohs(eth->ether_type)) { 
     612        case ETHERTYPE_VLAN: 
    613613            return 18; 
    614614            break;