platform.h File Reference

mbed TLS Platform abstraction layer More...

`#include "config.h"`
`#include <stddef.h>`
`#include <stdio.h>`
Include dependency graph for platform.h:

Go to the source code of this file.

## Functions

int | mbedtls_platform_set_calloc_free (void *(*calloc_func)(size_t, size_t), void(*free_func)(void *))
| Set your own memory implementation function pointers. More...
int | mbedtls_platform_set_fprintf (int(*fprintf_func)(FILE *stream, const char *,...))
| Set your own fprintf function pointer. More...
int | mbedtls_platform_set_printf (int(*printf_func)(const char *,...))
| Set your own printf function pointer. More...
int | mbedtls_platform_set_snprintf (int(*snprintf_func)(char *s, size_t n, const char *format,...))
| Set your own snprintf function pointer. More...
int | mbedtls_platform_set_exit (void(*exit_func)(int status))
| Set your own exit function pointer. More...

## Variables

void *(* | mbedtls_calloc )(size_t n, size_t size)
void(* | mbedtls_free )(void *ptr)
int(* | mbedtls_fprintf )(FILE *stream, const char *format,...)
int(* | mbedtls_printf )(const char *format,...)
int(* | mbedtls_snprintf )(char *s, size_t n, const char *format,...)
void(* | mbedtls_exit )(int status)

## Detailed Description

mbed TLS Platform abstraction layer

Copyright (C) 2006-2015, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0

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

http://www.apache.org/licenses/LICENSE-2.0

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.

This file is part of mbed TLS (https://tls.mbed.org)

Definition in file platform.h.

## Function Documentation

int mbedtls_platform_set_calloc_free | ( | void *(*)(size_t, size_t) | calloc_func,
|  | void(*)(void *) | free_func
| ) |  |

Set your own memory implementation function pointers.

Parameters

  calloc_func | the calloc function implementation
  free_func | the free function implementation

Returns
  0 if successful

int mbedtls_platform_set_exit | ( | void(*)(int status) | exit_func | ) |

Set your own exit function pointer.

Parameters

  exit_func | the exit function implementation

Returns
  0

int mbedtls_platform_set_fprintf | ( | int(*)(FILE *stream, const char *,...) | fprintf_func | ) |

Set your own fprintf function pointer.

Parameters

  fprintf_func | the fprintf function implementation

Returns
  0

int mbedtls_platform_set_printf | ( | int(*)(const char *,...) | printf_func | ) |

Set your own printf function pointer.

Parameters

  printf_func | the printf function implementation

Returns
  0

int mbedtls_platform_set_snprintf | ( | int(*)(char *s, size_t n, const char *format,...) | snprintf_func | ) |

Set your own snprintf function pointer.

Parameters

  snprintf_func | the snprintf function implementation

Returns
  0

## Variable Documentation

void*(* mbedtls_calloc) (size_t n, size_t size)

void(* mbedtls_exit) (int status)

int(* mbedtls_fprintf) (FILE *stream, const char *format,...)

void(* mbedtls_free) (void *ptr)

int(* mbedtls_printf) (const char *format,...)

int(* mbedtls_snprintf) (char *s, size_t n, const char *format,...)