]> git.ipfire.org Git - thirdparty/pciutils.git/blob - pciutils.h
Released as version 1.08.
[thirdparty/pciutils.git] / pciutils.h
1 /*
2 * $Id: pciutils.h,v 1.9 1998/10/19 13:40:45 mj Exp $
3 *
4 * Linux PCI Utilities -- Declarations
5 *
6 * Copyright (c) 1997, 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
7 *
8 * Can be freely distributed and used under the terms of the GNU GPL.
9 */
10
11 #include <linux/types.h>
12
13 #ifdef KERNEL_PCI_H
14 #include <linux/pci.h>
15 #else
16 #include "pci.h"
17 #endif
18
19 #define PCIUTILS_VERSION "1.08"
20
21 #define PROC_BUS_PCI "/proc/bus/pci"
22 #define ETC_PCI_IDS "/etc/pci.ids"
23
24 /* Types */
25
26 typedef __u8 byte;
27 typedef __u16 word;
28 typedef __u32 u32;
29
30 /* lspci.c */
31
32 void *xmalloc(unsigned int);
33
34 /* names.c */
35
36 extern int show_numeric_ids;
37 extern char *pci_ids;
38
39 char *lookup_vendor(word);
40 char *lookup_device(word, word);
41 char *lookup_device_full(word, word);
42 char *lookup_class(word);
43 char *lookup_subsys_vendor(word);
44 char *lookup_subsys_device(word, word);
45 char *lookup_subsys_device_full(word, word);
46
47 /* filter.c */
48
49 struct pci_filter {
50 int bus, slot, func; /* -1 = ANY */
51 int vendor, device;
52 };
53
54 void filter_init(struct pci_filter *);
55 char *filter_parse_slot(struct pci_filter *, char *);
56 char *filter_parse_id(struct pci_filter *, char *);
57 int filter_match(struct pci_filter *, byte bus, byte devfn, word vendid, word devid);