⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 names.h

📁 linux下的pci设备浏览工具
💻 H
字号:
/* *	The PCI Library -- ID to Name Translation * *	Copyright (c) 1997--2008 Martin Mares <mj@ucw.cz> * *	Can be freely distributed and used under the terms of the GNU GPL. */#define MAX_LINE 1024/* names-hash.c */struct id_entry {  struct id_entry *next;  u32 id12, id34;  byte cat;  byte src;  char name[1];};enum id_entry_type {  ID_UNKNOWN,  ID_VENDOR,  ID_DEVICE,  ID_SUBSYSTEM,  ID_GEN_SUBSYSTEM,  ID_CLASS,  ID_SUBCLASS,  ID_PROGIF};enum id_entry_src {  SRC_UNKNOWN,  SRC_CACHE,  SRC_NET,  SRC_LOCAL,};#define BUCKET_SIZE 8192#define HASH_SIZE 4099static inline u32 id_pair(unsigned int x, unsigned int y){  return ((x << 16) | y);}static inline unsigned int pair_first(unsigned int x){  return (x >> 16) & 0xffff;}static inline unsigned int pair_second(unsigned int x){  return x & 0xffff;}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);char *pci_id_lookup(struct pci_access *a, int flags, int cat, int id1, int id2, int id3, int id4);/* names-cache.c */int pci_id_cache_load(struct pci_access *a, int flags);void pci_id_cache_dirty(struct pci_access *a);void pci_id_cache_flush(struct pci_access *a);void pci_id_hash_free(struct pci_access *a);/* names-dns.c */char *pci_id_net_lookup(struct pci_access *a, int cat, int id1, int id2, int id3, int id4);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -