]>
git.ipfire.org Git - thirdparty/pciutils.git/blob - lib/names.h
2 * The PCI Library -- ID to Name Translation
4 * Copyright (c) 1997--2008 Martin Mares <mj@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
14 struct id_entry
*next
;
39 #define BUCKET_SIZE 8192
40 #define HASH_SIZE 4099
42 static inline u32
id_pair(unsigned int x
, unsigned int y
)
44 return ((x
<< 16) | y
);
47 static inline unsigned int pair_first(unsigned int x
)
49 return (x
>> 16) & 0xffff;
52 static inline unsigned int pair_second(unsigned int x
)
57 int pci_id_insert(struct pci_access
*a
, int cat
, int id1
, int id2
, int id3
, int id4
, char *text
, enum id_entry_src src
);
58 char *pci_id_lookup(struct pci_access
*a
, int flags
, int cat
, int id1
, int id2
, int id3
, int id4
);
62 int pci_id_cache_load(struct pci_access
*a
, int flags
);
63 void pci_id_cache_dirty(struct pci_access
*a
);
64 void pci_id_cache_flush(struct pci_access
*a
);
65 void pci_id_hash_free(struct pci_access
*a
);
69 char *pci_id_net_lookup(struct pci_access
*a
, int cat
, int id1
, int id2
, int id3
, int id4
);