dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libpcidb / common / pcidb.h
bloba11e4d90f1b52115a9741bd6e85677bfec4cb387
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
26 * This header file is private to illumos and should not be shipped.
29 #ifndef _PCIDB_H
30 #define _PCIDB_H
32 #include <stdint.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 #define PCIDB_VERSION 1
40 typedef struct pcidb_hdl pcidb_hdl_t;
41 typedef struct pcidb_vendor pcidb_vendor_t;
42 typedef struct pcidb_device pcidb_device_t;
43 typedef struct pcidb_subvd pcidb_subvd_t;
45 extern pcidb_hdl_t *pcidb_open(int);
46 extern void pcidb_close(pcidb_hdl_t *);
48 extern pcidb_vendor_t *pcidb_lookup_vendor(pcidb_hdl_t *, uint16_t);
49 extern pcidb_vendor_t *pcidb_vendor_iter(pcidb_hdl_t *);
50 extern pcidb_vendor_t *pcidb_vendor_iter_next(pcidb_vendor_t *);
52 extern const char *pcidb_vendor_name(pcidb_vendor_t *);
53 extern uint16_t pcidb_vendor_id(pcidb_vendor_t *);
55 extern pcidb_device_t *pcidb_lookup_device(pcidb_hdl_t *, uint16_t, uint16_t);
56 extern pcidb_device_t *pcidb_lookup_device_by_vendor(pcidb_vendor_t *,
57 uint16_t);
58 extern pcidb_device_t *pcidb_device_iter(pcidb_vendor_t *);
59 extern pcidb_device_t *pcidb_device_iter_next(pcidb_device_t *);
61 extern const char *pcidb_device_name(pcidb_device_t *);
62 extern uint16_t pcidb_device_id(pcidb_device_t *);
63 extern pcidb_vendor_t *pcidb_device_vendor(pcidb_device_t *);
65 extern pcidb_subvd_t *pcidb_lookup_subvd(pcidb_hdl_t *, uint16_t, uint16_t,
66 uint16_t, uint16_t);
67 extern pcidb_subvd_t *pcidb_lookup_subvd_by_vendor(pcidb_vendor_t *, uint16_t,
68 uint16_t, uint16_t);
69 extern pcidb_subvd_t *pcidb_lookup_subvd_by_device(pcidb_device_t *, uint16_t,
70 uint16_t);
71 extern pcidb_subvd_t *pcidb_subvd_iter(pcidb_device_t *);
72 extern pcidb_subvd_t *pcidb_subvd_iter_next(pcidb_subvd_t *);
74 extern const char *pcidb_subvd_name(pcidb_subvd_t *);
75 extern uint16_t pcidb_subvd_svid(pcidb_subvd_t *);
76 extern uint16_t pcidb_subvd_sdid(pcidb_subvd_t *);
77 extern pcidb_device_t *pcidb_subvd_device(pcidb_subvd_t *);
78 extern pcidb_vendor_t *pcidb_subvd_vendor(pcidb_subvd_t *);
80 #ifdef __cplusplus
82 #endif
84 #endif /* _PCIDB_H */