mbed TLS v3.1.0
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
mbedtls
timing.h
Go to the documentation of this file.
1
6
/*
7
* Copyright The Mbed TLS Contributors
8
* SPDX-License-Identifier: Apache-2.0
9
*
10
* Licensed under the Apache License, Version 2.0 (the "License"); you may
11
* not use this file except in compliance with the License.
12
* You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing, software
17
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
* See the License for the specific language governing permissions and
20
* limitations under the License.
21
*/
22
#ifndef MBEDTLS_TIMING_H
23
#define MBEDTLS_TIMING_H
24
#include "
mbedtls/private_access.h
"
25
26
#include "
mbedtls/build_info.h
"
27
28
#include <stdint.h>
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
34
#if !defined(MBEDTLS_TIMING_ALT)
35
// Regular implementation
36
//
37
41
struct
mbedtls_timing_hr_time
42
{
43
unsigned
char
MBEDTLS_PRIVATE
(opaque)[32];
44
};
45
49
typedef
struct
mbedtls_timing_delay_context
50
{
51
struct
mbedtls_timing_hr_time
MBEDTLS_PRIVATE
(timer);
52
uint32_t
MBEDTLS_PRIVATE
(int_ms);
53
uint32_t
MBEDTLS_PRIVATE
(fin_ms);
54
}
mbedtls_timing_delay_context
;
55
56
#else
/* MBEDTLS_TIMING_ALT */
57
#include "timing_alt.h"
58
#endif
/* MBEDTLS_TIMING_ALT */
59
60
/* Internal use */
61
unsigned
long
mbedtls_timing_get_timer
(
struct
mbedtls_timing_hr_time
*val,
int
reset );
62
77
void
mbedtls_timing_set_delay
(
void
*data, uint32_t int_ms, uint32_t fin_ms );
78
91
int
mbedtls_timing_get_delay
(
void
*data );
92
93
#ifdef __cplusplus
94
}
95
#endif
96
97
#endif
/* timing.h */
mbedtls_timing_delay_context
struct mbedtls_timing_delay_context mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
MBEDTLS_PRIVATE
#define MBEDTLS_PRIVATE(member)
Definition:
private_access.h:27
mbedtls_timing_set_delay
void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms)
Set a pair of delays to watch (See mbedtls_timing_get_delay().)
mbedtls_timing_delay_context
Context for mbedtls_timing_set/get_delay()
Definition:
timing.h:49
private_access.h
Macro wrapper for struct's memebrs.
build_info.h
Build-time configuration info.
mbedtls_timing_get_timer
unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset)
mbedtls_timing_hr_time
timer structure
Definition:
timing.h:41
mbedtls_timing_get_delay
int mbedtls_timing_get_delay(void *data)
Get the status of delays (Memory helper: number of delays passed.)
Generated on Sun Apr 3 2022 01:09:01 for mbed TLS v3.1.0 by
1.8.10