]> mj.ucw.cz Git - pciutils.git/blobdiff - pciutils.h
Intermediate version of pciutils.
[pciutils.git] / pciutils.h
index fe0388d90c2e69d47d897489ca90e018163d668d..d7fab9036b1dfb5b22feed3b40bc1edf182a0383 100644 (file)
@@ -1,23 +1,24 @@
 /*
- *     $Id: pciutils.h,v 1.1 1997/12/23 10:29:18 mj Exp $
+ *     $Id: pciutils.h,v 1.4 1998/03/31 21:02:18 mj Exp $
  *
  *     Linux PCI Utilities -- Declarations
  *
- *     Copyright (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     Copyright (c) 1997, 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 
 #include <linux/types.h>
 
-#if 1
-#define PROC_BUS_PCI "/proc/bus/pci"
-#define ETC_PCI_IDS "/etc/pci.ids"
+#ifdef KERNEL_PCI_H
+#include <linux/pci.h>
 #else
-#define PROC_BUS_PCI "/tmp/bus/pci"
-#define ETC_PCI_IDS "pci.ids"
+#include "pci.h"
 #endif
 
+#define PROC_BUS_PCI "/proc/bus/pci"
+#define ETC_PCI_IDS "/etc/pci.ids"
+
 /* Types */
 
 typedef __u8 byte;
@@ -31,8 +32,21 @@ void *xmalloc(unsigned int);
 /* names.c */
 
 extern int show_numeric_ids;
+extern char *pci_ids;
 
 char *lookup_vendor(word);
 char *lookup_device(word, word);
 char *lookup_device_full(word, word);
 char *lookup_class(word);
+
+/* filter.c */
+
+struct pci_filter {
+  int bus, slot, func;                 /* -1 = ANY */
+  int vendor, device;
+};
+
+void filter_init(struct pci_filter *);
+char *filter_parse_slot(struct pci_filter *, char *);
+char *filter_parse_id(struct pci_filter *, char *);
+int filter_match(struct pci_filter *, byte bus, byte devfn, word vendid, word devid);