]>
git.ipfire.org Git - thirdparty/pciutils.git/blob - lib/names.h
2 * The PCI Library -- ID to Name Translation
4 * Copyright (c) 1997--2014 Martin Mares <mj@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
14 struct id_entry
*next
;
40 #define BUCKET_SIZE 8192
41 #define HASH_SIZE 4099
43 static inline u32
id_pair(unsigned int x
, unsigned int y
)
45 return ((x
<< 16) | y
);
48 static inline unsigned int pair_first(unsigned int x
)
50 return (x
>> 16) & 0xffff;
53 static inline unsigned int pair_second(unsigned int x
)
58 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
);
59 char *pci_id_lookup(struct pci_access
*a
, int flags
, int cat
, int id1
, int id2
, int id3
, int id4
);
63 int pci_id_cache_load(struct pci_access
*a
, int flags
);
64 void pci_id_cache_dirty(struct pci_access
*a
);
65 void pci_id_cache_flush(struct pci_access
*a
);
66 void pci_id_hash_free(struct pci_access
*a
);
70 char *pci_id_net_lookup(struct pci_access
*a
, int cat
, int id1
, int id2
, int id3
, int id4
);
74 char *pci_id_hwdb_lookup(struct pci_access
*a
, int cat
, int id1
, int id2
, int id3
, int id4
);
75 void pci_id_hwdb_free(struct pci_access
*a
);