Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > e405d5f6b10a3a92bd2c28c4aa026c70 > files > 734

lib64mbedtls-devel-2.6.0-1.mga6.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mbed TLS v2.6.0: timing.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">mbed TLS v2.6.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_b4d146e9a6d8dd56ed4afb2480a97fd3.html">mbedtls</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">timing.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Portable interface to the CPU cycle counter.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="config_8h_source.html">config.h</a>&quot;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for timing.h:</div>
<div class="dyncontent">
<div class="center"><img src="timing_8h__incl.png" border="0" usemap="#timing_8h" alt=""/></div>
<map name="timing_8h" id="timing_8h">
<area shape="rect" id="node2" href="config_8h.html" title="Configuration options (set of defines) " alt="" coords="35,80,138,107"/>
<area shape="rect" id="node3" href="check__config_8h.html" title="Consistency checks for configuration options. " alt="" coords="5,155,168,181"/>
</map>
</div>
</div>
<p><a href="timing_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__timing__hr__time.html">mbedtls_timing_hr_time</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">timer structure  <a href="structmbedtls__timing__hr__time.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmbedtls__timing__delay__context.html">mbedtls_timing_delay_context</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Context for mbedtls_timing_set/get_delay()  <a href="structmbedtls__timing__delay__context.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aeec9ae2577ce34ab01f2d213b99d07e1"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#aeec9ae2577ce34ab01f2d213b99d07e1">mbedtls_timing_hardclock</a> (void)</td></tr>
<tr class="memdesc:aeec9ae2577ce34ab01f2d213b99d07e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the CPU cycle counter value.  <a href="#aeec9ae2577ce34ab01f2d213b99d07e1">More...</a><br /></td></tr>
<tr class="separator:aeec9ae2577ce34ab01f2d213b99d07e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a427660928e1e0339d497390c167f895c"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#a427660928e1e0339d497390c167f895c">mbedtls_timing_get_timer</a> (struct <a class="el" href="structmbedtls__timing__hr__time.html">mbedtls_timing_hr_time</a> *val, int reset)</td></tr>
<tr class="memdesc:a427660928e1e0339d497390c167f895c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the elapsed time in milliseconds.  <a href="#a427660928e1e0339d497390c167f895c">More...</a><br /></td></tr>
<tr class="separator:a427660928e1e0339d497390c167f895c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ea7574e836da0dc51b4b16c4033ede3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#a7ea7574e836da0dc51b4b16c4033ede3">mbedtls_set_alarm</a> (int seconds)</td></tr>
<tr class="memdesc:a7ea7574e836da0dc51b4b16c4033ede3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup an alarm clock.  <a href="#a7ea7574e836da0dc51b4b16c4033ede3">More...</a><br /></td></tr>
<tr class="separator:a7ea7574e836da0dc51b4b16c4033ede3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb3497ab85adabf7db89d81c34e2ef92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#aeb3497ab85adabf7db89d81c34e2ef92">mbedtls_timing_set_delay</a> (void *data, uint32_t int_ms, uint32_t fin_ms)</td></tr>
<tr class="memdesc:aeb3497ab85adabf7db89d81c34e2ef92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a pair of delays to watch (See <code><a class="el" href="timing_8h.html#afb1705e8c4227b0ec03089aa7fc54d9b" title="Get the status of delays (Memory helper: number of delays passed.) ">mbedtls_timing_get_delay()</a></code>.)  <a href="#aeb3497ab85adabf7db89d81c34e2ef92">More...</a><br /></td></tr>
<tr class="separator:aeb3497ab85adabf7db89d81c34e2ef92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb1705e8c4227b0ec03089aa7fc54d9b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#afb1705e8c4227b0ec03089aa7fc54d9b">mbedtls_timing_get_delay</a> (void *data)</td></tr>
<tr class="memdesc:afb1705e8c4227b0ec03089aa7fc54d9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the status of delays (Memory helper: number of delays passed.)  <a href="#afb1705e8c4227b0ec03089aa7fc54d9b">More...</a><br /></td></tr>
<tr class="separator:afb1705e8c4227b0ec03089aa7fc54d9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa832a2e14723215d909150c337199f53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#aa832a2e14723215d909150c337199f53">mbedtls_timing_self_test</a> (int verbose)</td></tr>
<tr class="memdesc:aa832a2e14723215d909150c337199f53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checkup routine.  <a href="#aa832a2e14723215d909150c337199f53">More...</a><br /></td></tr>
<tr class="separator:aa832a2e14723215d909150c337199f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:af5df1e20d5197a5af9f5daba5b6ca654"><td class="memItemLeft" align="right" valign="top">volatile int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timing_8h.html#af5df1e20d5197a5af9f5daba5b6ca654">mbedtls_timing_alarmed</a></td></tr>
<tr class="separator:af5df1e20d5197a5af9f5daba5b6ca654"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Portable interface to the CPU cycle counter. </p>
<p>Copyright (C) 2006-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
<p>This file is part of mbed TLS (<a href="https://tls.mbed.org">https://tls.mbed.org</a>) </p>

<p class="definition">Definition in file <a class="el" href="timing_8h_source.html">timing.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a7ea7574e836da0dc51b4b16c4033ede3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ea7574e836da0dc51b4b16c4033ede3">&#9670;&nbsp;</a></span>mbedtls_set_alarm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbedtls_set_alarm </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup an alarm clock. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">seconds</td><td>delay before the "mbedtls_timing_alarmed" flag is set</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>Only one alarm at a time is supported. In a threaded context, this means one for the whole process, not one per thread. </dd></dl>

</div>
</div>
<a id="afb1705e8c4227b0ec03089aa7fc54d9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb1705e8c4227b0ec03089aa7fc54d9b">&#9670;&nbsp;</a></span>mbedtls_timing_get_delay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_timing_get_delay </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the status of delays (Memory helper: number of delays passed.) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Pointer to timing data Must point to a valid <code><a class="el" href="structmbedtls__timing__delay__context.html" title="Context for mbedtls_timing_set/get_delay() ">mbedtls_timing_delay_context</a></code> struct.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-1 if cancelled (fin_ms = 0) 0 if none of the delays are passed, 1 if only the intermediate delay is passed, 2 if the final delay is passed. </dd></dl>

</div>
</div>
<a id="a427660928e1e0339d497390c167f895c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a427660928e1e0339d497390c167f895c">&#9670;&nbsp;</a></span>mbedtls_timing_get_timer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long mbedtls_timing_get_timer </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmbedtls__timing__hr__time.html">mbedtls_timing_hr_time</a> *&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>reset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the elapsed time in milliseconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">val</td><td>points to a timer structure </td></tr>
    <tr><td class="paramname">reset</td><td>if set to 1, the timer is restarted </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aeec9ae2577ce34ab01f2d213b99d07e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeec9ae2577ce34ab01f2d213b99d07e1">&#9670;&nbsp;</a></span>mbedtls_timing_hardclock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long mbedtls_timing_hardclock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the CPU cycle counter value. </p>
<dl class="section warning"><dt>Warning</dt><dd>This is only a best effort! Do not rely on this! In particular, it is known to be unreliable on virtual machines. </dd></dl>

</div>
</div>
<a id="aa832a2e14723215d909150c337199f53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa832a2e14723215d909150c337199f53">&#9670;&nbsp;</a></span>mbedtls_timing_self_test()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mbedtls_timing_self_test </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>verbose</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checkup routine. </p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or 1 if a test failed </dd></dl>

</div>
</div>
<a id="aeb3497ab85adabf7db89d81c34e2ef92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb3497ab85adabf7db89d81c34e2ef92">&#9670;&nbsp;</a></span>mbedtls_timing_set_delay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mbedtls_timing_set_delay </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>int_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>fin_ms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a pair of delays to watch (See <code><a class="el" href="timing_8h.html#afb1705e8c4227b0ec03089aa7fc54d9b" title="Get the status of delays (Memory helper: number of delays passed.) ">mbedtls_timing_get_delay()</a></code>.) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Pointer to timing data Must point to a valid <code><a class="el" href="structmbedtls__timing__delay__context.html" title="Context for mbedtls_timing_set/get_delay() ">mbedtls_timing_delay_context</a></code> struct. </td></tr>
    <tr><td class="paramname">int_ms</td><td>First (intermediate) delay in milliseconds. </td></tr>
    <tr><td class="paramname">fin_ms</td><td>Second (final) delay in milliseconds. Pass 0 to cancel the current delay. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="af5df1e20d5197a5af9f5daba5b6ca654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5df1e20d5197a5af9f5daba5b6ca654">&#9670;&nbsp;</a></span>mbedtls_timing_alarmed</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile int mbedtls_timing_alarmed</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 28 2017 18:33:30 for mbed TLS v2.6.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>