Sindbad~EG File Manager

Current Path : /usr/local/share/doc/libfido2/html/
Upload File :
Current File : //usr/local/share/doc/libfido2/html/fido_dev_info_path.html

<!DOCTYPE html>
<html>
<!-- This is an automatically generated file.  Do not edit.
   Copyright (c) 2018 Yubico AB. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are
   met:
  
      1. Redistributions of source code must retain the above copyright
         notice, this list of conditions and the following disclaimer.
      2. Redistributions in binary form must reproduce the above copyright
         notice, this list of conditions and the following disclaimer in
         the documentation and/or other materials provided with the
         distribution.
  
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   SPDX-License-Identifier: BSD-2-Clause
   -->
<head>
  <meta charset="utf-8"/>
  <link rel="stylesheet" href="style.css" type="text/css" media="all"/>
  <title>FIDO_DEV_INFO_MANIFEST(3)</title>
</head>
<body>
<table class="head">
  <tr>
    <td class="head-ltitle">FIDO_DEV_INFO_MANIFEST(3)</td>
    <td class="head-vol">FreeBSD Library Functions Manual</td>
    <td class="head-rtitle">FIDO_DEV_INFO_MANIFEST(3)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">fido_dev_info_manifest</code>,
  <code class="Nm">fido_dev_info_new</code>,
  <code class="Nm">fido_dev_info_free</code>,
  <code class="Nm">fido_dev_info_ptr</code>,
  <code class="Nm">fido_dev_info_path</code>,
  <code class="Nm">fido_dev_info_product</code>,
  <code class="Nm">fido_dev_info_vendor</code>,
  <code class="Nm">fido_dev_info_manufacturer_string</code>,
  <code class="Nm">fido_dev_info_product_string</code>,
  <code class="Nm">fido_dev_info_set</code> &#x2014;
<div class="Nd">FIDO2 device discovery functions</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">fido.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">fido_dev_info_manifest</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_info_t
    *devlist</var>, <var class="Fa" style="white-space: nowrap;">size_t
    ilen</var>, <var class="Fa" style="white-space: nowrap;">size_t
    *olen</var>);</p>
<p class="Pp"><var class="Ft">fido_dev_info_t *</var>
  <br/>
  <code class="Fn">fido_dev_info_new</code>(<var class="Fa" style="white-space: nowrap;">size_t
    n</var>);</p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">fido_dev_info_free</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_info_t
    **devlist_p</var>, <var class="Fa" style="white-space: nowrap;">size_t
    n</var>);</p>
<p class="Pp"><var class="Ft">const fido_dev_info_t *</var>
  <br/>
  <code class="Fn">fido_dev_info_ptr</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *devlist</var>,
    <var class="Fa" style="white-space: nowrap;">size_t i</var>);</p>
<p class="Pp"><var class="Ft">const char *</var>
  <br/>
  <code class="Fn">fido_dev_info_path</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *di</var>);</p>
<p class="Pp"><var class="Ft">int16_t</var>
  <br/>
  <code class="Fn">fido_dev_info_product</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *di</var>);</p>
<p class="Pp"><var class="Ft">int16_t</var>
  <br/>
  <code class="Fn">fido_dev_info_vendor</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *di</var>);</p>
<p class="Pp"><var class="Ft">const char *</var>
  <br/>
  <code class="Fn">fido_dev_info_manufacturer_string</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *di</var>);</p>
<p class="Pp"><var class="Ft">const char *</var>
  <br/>
  <code class="Fn">fido_dev_info_product_string</code>(<var class="Fa" style="white-space: nowrap;">const
    fido_dev_info_t *di</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">fido_dev_info_set</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_info_t
    *devlist</var>, <var class="Fa" style="white-space: nowrap;">size_t i</var>,
    <var class="Fa" style="white-space: nowrap;">const char *path</var>,
    <var class="Fa" style="white-space: nowrap;">const char *manufacturer</var>,
    <var class="Fa" style="white-space: nowrap;">const char *product</var>,
    <var class="Fa" style="white-space: nowrap;">const fido_dev_io_t *io</var>,
    <var class="Fa" style="white-space: nowrap;">const fido_dev_transport_t
    *transport</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">fido_dev_info_manifest</code>() function fills
  <var class="Fa">devlist</var> with up to <var class="Fa">ilen</var> FIDO2
  devices found by the underlying operating system. Currently only USB HID
  devices are supported. The number of discovered devices is returned in
  <var class="Fa">olen</var>, where <var class="Fa">olen</var> is an addressable
  pointer.
<p class="Pp">The <code class="Fn">fido_dev_info_new</code>() function returns a
    pointer to a newly allocated, empty device list with <var class="Fa">n</var>
    available slots. If memory is not available, NULL is returned.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_free</code>() function releases
    the memory backing <var class="Fa">*devlist_p</var>, where
    <var class="Fa">*devlist_p</var> must have been previously allocated by
    <code class="Fn">fido_dev_info_new</code>(). The number
    <var class="Fa">n</var> of allocated slots must also be provided. On return,
    <var class="Fa">*devlist_p</var> is set to NULL. Either
    <var class="Fa">devlist_p</var> or <var class="Fa">*devlist_p</var> may be
    NULL, in which case <code class="Fn">fido_dev_info_free</code>() is a
  NOP.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_ptr</code>() function returns a
    pointer to slot number <var class="Fa">i</var> of
    <var class="Fa">devlist</var>. It is the caller's responsibility to ensure
    that <var class="Fa">i</var> is bounded. Please note that the first slot has
    index 0.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_path</code>() function returns
    the filesystem path or subsystem-specific identification string of
    <var class="Fa">di</var>.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_product</code>() function
    returns the product ID of <var class="Fa">di</var>.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_vendor</code>() function
    returns the vendor ID of <var class="Fa">di</var>.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_manufacturer_string</code>()
    function returns the manufacturer string of <var class="Fa">di</var>. If
    <var class="Fa">di</var> does not have an associated manufacturer string,
    <code class="Fn">fido_dev_info_manufacturer_string</code>() returns an empty
    string.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_product_string</code>()
    function returns the product string of <var class="Fa">di</var>. If
    <var class="Fa">di</var> does not have an associated product string,
    <code class="Fn">fido_dev_info_product_string</code>() returns an empty
    string.</p>
<p class="Pp">An example of how to use the functions described in this document
    can be found in the <span class="Pa">examples/manifest.c</span> file shipped
    with <i class="Em">libfido2</i>.</p>
<p class="Pp">The <code class="Fn">fido_dev_info_set</code>() function
    initializes an entry in a device list allocated by
    <code class="Fn">fido_dev_info_new</code>() with the specified path,
    manufacturer, and product strings, and with the specified I/O handlers and,
    optionally, transport functions, as described in
    <a class="Xr" href="fido_dev_set_io_functions.html">fido_dev_set_io_functions(3)</a>.
    The <var class="Fa">io</var> argument must be specified; the
    <var class="Fa">transport</var> argument may be
    <code class="Dv">NULL</code>. The path, I/O handlers, and transport
    functions will be used automatically by
    <a class="Xr" href="fido_dev_new_with_info.html">fido_dev_new_with_info(3)</a>
    and
    <a class="Xr" href="fido_dev_open_with_info.html">fido_dev_open_with_info(3)</a>.
    An application can use this, for example, to substitute mock FIDO2 devices
    in testing for the real ones that
    <code class="Fn">fido_dev_info_manifest</code>() would discover.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
The <code class="Fn">fido_dev_info_manifest</code>() function always returns
  <code class="Dv">FIDO_OK</code>. If a discovery error occurs, the
  <var class="Fa">olen</var> pointer is set to 0.
<p class="Pp">On success, the <code class="Fn">fido_dev_info_set</code>()
    function returns <code class="Dv">FIDO_OK</code>. On error, a different
    error code defined in
    <code class="In">&lt;<a class="In">fido/err.h</a>&gt;</code> is
  returned.</p>
<p class="Pp">The pointers returned by
    <code class="Fn">fido_dev_info_ptr</code>(),
    <code class="Fn">fido_dev_info_path</code>(),
    <code class="Fn">fido_dev_info_manufacturer_string</code>(), and
    <code class="Fn">fido_dev_info_product_string</code>() are guaranteed to
    exist until <code class="Fn">fido_dev_info_free</code>() is called on the
    corresponding device list.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">March 30, 2022</td>
    <td class="foot-os">Yubico&#x00A0;AB</td>
  </tr>
</table>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists