libteam  1.28
Functions
String conversion functions
Collaboration diagram for String conversion functions:

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
ifinfoifinfo structure
bufbuffer where string will be stored
bufsizavailable 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
thlibteam library context
optionoption structure
bufbuffer where string will be stored
bufsizavailable 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
optionoption structure
bufbuffer where string will be stored
bufsizavailable 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
portport structure
bufbuffer where string will be stored
bufsizavailable 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
thlibteam library context
optionoption structure
strstring containing option value

Convert option value from string and set it.

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