libteam 1.31

Functions
String conversion functions
Libteam

## Functions
TEAM_EXPORT bool | team_option_value_str (struct team_option *option, char *buf, size_t bufsiz)
TEAM_EXPORT int | team_set_option_value_from_string (struct team_handle *th, struct team_option *option, const char *str)
TEAM_EXPORT bool | team_option_str (struct team_handle *th, struct team_option *option, char *buf, size_t bufsiz)
TEAM_EXPORT bool | team_port_str (struct team_port *port, char *buf, size_t bufsiz)
TEAM_EXPORT bool | team_ifinfo_str (struct team_ifinfo *ifinfo, char *buf, size_t bufsiz)

## Detailed Description

Helpers for conversion team objects to string

## Header

#include <team.h>

## Function Documentation

## ◆ team_ifinfo_str()

TEAM_EXPORT bool team_ifinfo_str | ( | struct team_ifinfo * | ifinfo,
|  | char * | buf,
|  | size_t | bufsiz
| ) |  |

Parameters

  ifinfo | ifinfo structure
  buf | buffer where string will be stored
  bufsiz | available buffer size

Converts ifinfo structure to string.

Returns
  True in case buffer is not big enough to contain whole string.

## ◆ team_option_str()

TEAM_EXPORT bool team_option_str | ( | struct team_handle * | th,
|  | struct team_option * | option,
|  | char * | buf,
|  | size_t | bufsiz
| ) |  |

Parameters

  th | libteam library context
  option | option structure
  buf | buffer where string will be stored
  bufsiz | available buffer size

Converts option structure to string.

Returns
  True in case buffer is not big enough to contain whole string.

## ◆ team_option_value_str()

TEAM_EXPORT bool team_option_value_str | ( | struct team_option * | option,
|  | char * | buf,
|  | size_t | bufsiz
| ) |  |

Parameters

  option | option structure
  buf | buffer where string will be stored
  bufsiz | available buffer size

Converts option value to string.

Returns
  True in case buffer is not big enough to contain whole string.

## ◆ team_port_str()

TEAM_EXPORT bool team_port_str | ( | struct team_port * | port,
|  | char * | buf,
|  | size_t | bufsiz
| ) |  |

Parameters

  port | port structure
  buf | buffer where string will be stored
  bufsiz | available buffer size

Converts port structure to string.

Returns
  True in case buffer is not big enough to contain whole string.

## ◆ team_set_option_value_from_string()

TEAM_EXPORT int team_set_option_value_from_string | ( | struct team_handle * | th,
|  | struct team_option * | option,
|  | const char * | str
| ) |  |

Parameters

  th | libteam library context
  option | option structure
  str | string containing option value

Convert option value from string and set it.

Returns
  Zero on success or negative number in case of an error.