'\" te .\" Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. .TH pci_plist_lookup 9F "24 Oct 2011" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME pci_plist_lookup, pci_plist_lookup_int8, pci_plist_lookup_uint8, pci_plist_lookup_int16, pci_plist_lookup_uint16, pci_plist_lookup_int32, pci_plist_lookup_uint32, pci_plist_lookup_int64, pci_plist_lookup_uint64, pci_plist_lookup_string, pci_plist_lookup_plist, pci_plist_lookup_int8_array, pci_plist_lookup_uint8_array, pci_plist_lookup_int16_array, pci_plist_lookup_uint16_array, pci_plist_lookup_int32_array, pci_plist_lookup_uint32_array, pci_plist_lookup_int64_array, pci_plist_lookup_uint64_array, pci_plist_lookup_string_array \- name-value pair lookup functions .SH SYNOPSIS .LP .nf #include int pci_plist_lookup_int8(pci_plist_t \fIplist\fR, const char *\fIname\fR, int8_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_uint8(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint8_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_int16(pci_plist_t \fIplist\fR, const char *\fIname\fR, int16_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_uint16(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint16_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_int32(pci_plist_t \fIplist\fR, const char *\fIname\fR, int32_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_uint32(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint32_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_int64(pci_plist_t \fIplist\fR, const char *\fIname\fR, int64_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_uint64(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint64_t *\fIval\fR); .fi .LP .nf int pci_plist_lookup_string(pci_plist_t \fIplist\fR, const char *\fIname\fR, char **\fIval\fR); .fi .LP .nf int pci_plist_lookup_plist(pci_plist_t \fIplist\fR, const char *\fIname\fR, pci_plist_t **\fIval\fR); .fi .LP .nf int pci_plist_lookup_int8_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, int8_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_uint8_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint8_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_int16_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, int16_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_uint16_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint16_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_int32_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, int32_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_uint32_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint32_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_int64_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, int64_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_uint64_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, uint64_t *\fIval\fR, uint_t *\fInelem\fR); .fi .LP .nf int pci_plist_lookup_string_array(pci_plist_t \fIplist\fR, const char *\fIname\fR, char **\fIval\fR, uint_t *\fInelem\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIplist\fR\fR .ad .RS 9n .rt A handle obtained from \fBpci_plist_get\fR(9F) or \fBpci_plist_getvf\fR(9F). .RE .sp .ne 2 .mk .na \fB\fIname\fR\fR .ad .RS 9n .rt Name of the name-value pair to search .RE .sp .ne 2 .mk .na \fB\fInelem\fR\fR .ad .RS 9n .rt Address to store the number of elements in value .RE .sp .ne 2 .mk .na \fB\fIval\fR\fR .ad .RS 9n .rt Address to store the starting address of the value .RE .SH DESCRIPTION .sp .LP These functions find the nvpair (name-value pair) that matches the name and type as indicated by the interface name. If one is found, \fInelem\fR and \fIval\fR are modified to contain the number of elements in value and the starting address of data, respectively. .SH RETURN VALUES .sp .LP These functions return 0 on success and an error value on failure. .SH ERRORS .sp .LP These functions will fail if: .sp .ne 2 .mk .na \fB\fBDDI_EINVAL\fR\fR .ad .RS 14n .rt There is an invalid argument. .RE .sp .ne 2 .mk .na \fB\fBENOENT\fR\fR .ad .RS 14n .rt No matching name-value pair is found .RE .sp .ne 2 .mk .na \fB\fBENOTSUP\fR\fR .ad .RS 14n .rt An encode/decode method is not supported. .RE .SH CONTEXT .sp .LP These functions can be called from kernel non-interrupt context. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityUncommitted .TE .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBpci_plist_get\fR(9F), \fBpci_plist_getvf\fR(9F), \fBpciv_vf_config\fR(9F), \fBpci_param_get_ioctl\fR(9F)