Add suppport for Microsoft Network Monitor Ethernet capture files.
[obnox/wireshark/wip.git] / wiretap / file.c
index 9ff7538b24838d3a39cd6df24b7b91b8048169df..28f1adf07685dc50d608b0aa11c473432fd5e7bf 100644 (file)
@@ -1,6 +1,6 @@
 /* file.c
  *
- * $Id: file.c,v 1.5 1999/01/02 06:10:55 gram Exp $
+ * $Id: file.c,v 1.6 1999/01/17 09:33:15 guy Exp $
  *
  * Wiretap Library
  * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
@@ -30,6 +30,7 @@
 #include "libpcap.h"
 #include "snoop.h"
 #include "iptrace.h"
+#include "netmon.h"
 
 /* The open_file_* routines should return the WTAP_FILE_* type
  * that they are checking for if the file is successfully recognized
@@ -70,6 +71,10 @@ wtap* wtap_open_offline(char *filename, int filetype)
                if ((wth->file_type = iptrace_open(wth)) != WTAP_FILE_UNKNOWN) {
                        goto success;
                }
+               /* WTAP_FILE_NETMON */
+               if ((wth->file_type = netmon_open(wth)) != WTAP_FILE_UNKNOWN) {
+                       goto success;
+               }
 
                printf("failed\n");
                /* WTAP_FILE_UNKNOWN */
@@ -103,6 +108,11 @@ wtap* wtap_open_offline(char *filename, int filetype)
                                goto success;
                        }
                        break;
+               case WTAP_FILE_NETMON:
+                       if ((wth->file_type = netmon_open(wth)) != WTAP_FILE_UNKNOWN) {
+                               goto success;
+                       }
+                       break;
                default:
                        goto failure;
        }