Ethereal-dev: [ethereal-dev] Patch to "packet-fddi.c" for non-0, non-4 priority async frames

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: guy@xxxxxxxxxx (Guy Harris)
Date: Sat, 3 Oct 1998 01:47:25 -0700 (PDT)
This is a patch to Laurent Deniel's "packet-fddi.c", to handle async
frames with a priority field other than 0 or 4.  Some devices around
here seem to use other priorities, e.g. 7:

*** packet-fddi.c	1998/10/03 08:30:11	1.1
--- packet-fddi.c	1998/10/03 08:36:47
***************
*** 96,102 ****
    if (tree) {
      ti = add_item_to_tree(GTK_WIDGET(tree), 0, offset,
  			  "FDDI %s (%d on wire, %d captured)",
! 			  (fc == FDDI_FC_LLC_ASYNC_DEF || fc == FDDI_FC_LLC_ASYNC) ?
  			  "Async LLC" : "unsupported FC",
  			  fd->pkt_len, fd->cap_len);
  
--- 96,102 ----
    if (tree) {
      ti = add_item_to_tree(GTK_WIDGET(tree), 0, offset,
  			  "FDDI %s (%d on wire, %d captured)",
! 			  (fc >= FDDI_FC_LLC_ASYNC_MIN && fc <= FDDI_FC_LLC_ASYNC_MAX) ?
  			  "Async LLC" : "unsupported FC",
  			  fd->pkt_len, fd->cap_len);
  
***************
*** 117,124 ****
  
      /* From now, only 802.2 SNAP (Async. LCC frame) is supported */
  
!     case FDDI_FC_LLC_ASYNC     :
!     case FDDI_FC_LLC_ASYNC_DEF :
        dissect_llc(pd, offset, fd, tree);
        return;
        
--- 117,138 ----
  
      /* From now, only 802.2 SNAP (Async. LCC frame) is supported */
  
!     case FDDI_FC_LLC_ASYNC + 0  :
!     case FDDI_FC_LLC_ASYNC + 1  :
!     case FDDI_FC_LLC_ASYNC + 2  :
!     case FDDI_FC_LLC_ASYNC + 3  :
!     case FDDI_FC_LLC_ASYNC + 4  :
!     case FDDI_FC_LLC_ASYNC + 5  :
!     case FDDI_FC_LLC_ASYNC + 6  :
!     case FDDI_FC_LLC_ASYNC + 7  :
!     case FDDI_FC_LLC_ASYNC + 8  :
!     case FDDI_FC_LLC_ASYNC + 9  :
!     case FDDI_FC_LLC_ASYNC + 10 :
!     case FDDI_FC_LLC_ASYNC + 11 :
!     case FDDI_FC_LLC_ASYNC + 12 :
!     case FDDI_FC_LLC_ASYNC + 13 :
!     case FDDI_FC_LLC_ASYNC + 14 :
!     case FDDI_FC_LLC_ASYNC + 15 :
        dissect_llc(pd, offset, fd, tree);
        return;