Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FIDO_DEV_INFO_MANIF... FreeBSD Library Functions Manual	FIDO_DEV_INFO_MANIF...

NAME
     fido_dev_info_manifest, fido_dev_info_new,	fido_dev_info_free,
     fido_dev_info_ptr,	fido_dev_info_path, fido_dev_info_product,
     fido_dev_info_vendor, fido_dev_info_manufacturer_string,
     fido_dev_info_product_string -- FIDO 2 device discovery functions

SYNOPSIS
     #include <fido.h>

     int
     fido_dev_info_manifest(fido_dev_info_t *devlist, size_t ilen,
	 size_t	*olen);

     fido_dev_info_t *
     fido_dev_info_new(size_t n);

     void
     fido_dev_info_free(fido_dev_info_t	**devlist_p, size_t n);

     const fido_dev_info_t *
     fido_dev_info_ptr(const fido_dev_info_t *devlist, size_t i);

     const char	*
     fido_dev_info_path(const fido_dev_info_t *di);

     int16_t
     fido_dev_info_product(const fido_dev_info_t *di);

     int16_t
     fido_dev_info_vendor(const	fido_dev_info_t	*di);

     const char	*
     fido_dev_info_manufacturer_string(const fido_dev_info_t *di);

     const char	*
     fido_dev_info_product_string(const	fido_dev_info_t	*di);

DESCRIPTION
     The fido_dev_info_manifest() function fills devlist with up to ilen FIDO
     devices found by the underlying operating system.	Currently only USB HID
     devices are supported.  The number	of discovered devices is returned in
     olen, where olen is an addressable	pointer.

     The fido_dev_info_new() function returns a	pointer	to a newly allocated,
     empty device list with n available	slots.	If memory is not available,
     NULL is returned.

     The fido_dev_info_free() function releases	the memory backing *devlist_p,
     where *devlist_p must have	been previously	allocated by
     fido_dev_info_new().  The number n	of allocated slots must	also be	pro-
     vided.  On	return,	*devlist_p is set to NULL.  Either devlist_p or
     *devlist_p	may be NULL, in	which case fido_dev_info_free()	is a NOP.

     The fido_dev_info_ptr() function returns a	pointer	to slot	number i of
     devlist.  It is the caller's responsibility to ensure that	i is bounded.
     Please note that the first	slot has index 0.

     The fido_dev_info_path() returns the filesystem path or subsystem-spe-
     cific identification string of di.

     The fido_dev_info_product() function returns the product ID of di.

     The fido_dev_info_vendor()	function returns the vendor ID of di.

     The fido_dev_info_manufacturer_string() function returns the manufacturer
     string of di.

     The fido_dev_info_product_string()	function returns the product string of
     di.

     An	example	of how to use the functions described in this document can be
     found in the examples/manifest.c file shipped with	libfido2.

RETURN VALUES
     The fido_dev_info_manifest() function always returns FIDO_OK.  If a dis-
     covery error occurs, the olen pointer is set to 0.

     The pointers returned by fido_dev_info_ptr(), fido_dev_info_path(),
     fido_dev_info_manufacturer_string(), and fido_dev_info_product_string()
     are guaranteed to exist until fido_dev_info_free()	is called on the cor-
     responding	device list.

FreeBSD	13.0			 May 25, 2018			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=fido_dev_info_manifest&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help