Refactor 802.11 radio flags.
[metze/wireshark/wip.git] / wiretap / erf.c
index a00eaed0ebc755a78b0f3104a0402e79feddc909..088845bd6b468e4fe1fe9ee9a41c23450e8b4093 100644 (file)
@@ -168,11 +168,6 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info)
       return WTAP_OPEN_NOT_MINE;
     }
 
-    /* The ERF_TYPE_MAX is the PAD record, but the last used type is ERF_TYPE_INFINIBAND_LINK */
-    if ((header.type & 0x7F) > ERF_TYPE_INFINIBAND_LINK) {
-      return WTAP_OPEN_NOT_MINE;
-    }
-
     if ((ts = pletoh64(&header.ts)) < prevts) {
       /* reassembled AALx records may not be in time order, also records are not in strict time order between physical interfaces, so allow 1 sec fudge */
       if ( ((prevts-ts)>>32) > 1 ) {
@@ -224,6 +219,7 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info)
       case ERF_TYPE_ETH:
       case ERF_TYPE_COLOR_ETH:
       case ERF_TYPE_DSM_COLOR_ETH:
+      case ERF_TYPE_COLOR_HASH_ETH:
         if (!wtap_read_bytes(wth->fh,&eth_hdr,sizeof(eth_hdr),err,err_info)) {
           if (*err == WTAP_ERR_SHORT_READ) {
             /* Subheader missing, not an ERF file */
@@ -429,6 +425,7 @@ static gboolean erf_read_header(FILE_T fh,
     case ERF_TYPE_RAW_LINK:
     case ERF_TYPE_INFINIBAND:
     case ERF_TYPE_INFINIBAND_LINK:
+    case ERF_TYPE_META:
 #if 0
       {
         phdr->len =  g_htons(erf_header->wlen);
@@ -441,6 +438,7 @@ static gboolean erf_read_header(FILE_T fh,
     case ERF_TYPE_HDLC_POS:
     case ERF_TYPE_COLOR_HDLC_POS:
     case ERF_TYPE_DSM_COLOR_HDLC_POS:
+    case ERF_TYPE_COLOR_HASH_POS:
     case ERF_TYPE_ATM:
     case ERF_TYPE_AAL5:
       break;
@@ -448,6 +446,7 @@ static gboolean erf_read_header(FILE_T fh,
     case ERF_TYPE_ETH:
     case ERF_TYPE_COLOR_ETH:
     case ERF_TYPE_DSM_COLOR_ETH:
+    case ERF_TYPE_COLOR_HASH_ETH:
       if (!wtap_read_bytes(fh, &eth_hdr, sizeof(eth_hdr), err, err_info))
         return FALSE;
       if (bytes_read != NULL)
@@ -550,6 +549,7 @@ static gboolean erf_write_phdr(wtap_dumper *wdh, int encap, const union wtap_pse
         case ERF_TYPE_ETH:
         case ERF_TYPE_COLOR_ETH:
         case ERF_TYPE_DSM_COLOR_ETH:
+        case ERF_TYPE_COLOR_HASH_ETH:
           phtons(&erf_subhdr[0], pseudo_header->erf.subhdr.eth_hdr);
           subhdr_size += (int)sizeof(struct erf_eth_hdr);
           break;