libsmbios_c library
Data Structures | Macros | Enumerations | Functions | Variables
token.h File Reference
#include "smbios_c/compat.h"
#include "smbios_c/types.h"
#include "smbios_c/config/abi_prefix.h"
#include "smbios_c/config/abi_suffix.h"
Include dependency graph for token.h:

Go to the source code of this file.

Data Structures

struct  indexed_io_token
 
struct  indexed_io_access_structure
 
struct  dell_protected_value_1_structure
 
struct  dell_protected_value_2_structure
 

Macros

#define TOKEN_DEFAULTS   0x0000
 
#define TOKEN_GET_SINGLETON   0x0001
 
#define TOKEN_GET_NEW   0x0002
 
#define TOKEN_UNIT_TEST_MODE   0x0004
 
#define TOKEN_NO_ERR_CLEAR   0x0008
 
#define token_table_for_each(table_name, struct_name)
 
#define token_table_for_each_id(table_name, struct_name, id)
 

Enumerations

enum  { CHECK_TYPE_WORD_CHECKSUM = 0x00 , CHECK_TYPE_BYTE_CHECKSUM = 0x01 , CHECK_TYPE_WORD_CRC = 0x02 , CHECK_TYPE_WORD_CHECKSUM_N = 0x03 }
 

Functions

LIBSMBIOS_C_DLL_SPEC struct token_table * token_table_factory (int flags,...)
 
LIBSMBIOS_C_DLL_SPEC void token_table_free (struct token_table *)
 
LIBSMBIOS_C_DLL_SPEC const char * token_table_strerror (const struct token_table *)
 
LIBSMBIOS_C_DLL_SPEC const char * token_obj_strerror (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC const struct token_obj * token_table_get_next (const struct token_table *, const struct token_obj *cur)
 
LIBSMBIOS_C_DLL_SPEC const struct token_obj * token_table_get_next_by_id (const struct token_table *, const struct token_obj *cur, u16 id)
 
LIBSMBIOS_C_DLL_SPEC u16 token_obj_get_id (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC int token_obj_get_type (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC bool token_obj_is_bool (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC int token_obj_is_active (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC int token_obj_activate (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC bool token_obj_is_string (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC char * token_obj_get_string (const struct token_obj *, size_t *len)
 
LIBSMBIOS_C_DLL_SPEC int token_obj_set_string (const struct token_obj *, const char *, size_t size)
 
LIBSMBIOS_C_DLL_SPEC const struct smbios_struct * token_obj_get_smbios_struct (const struct token_obj *)
 
LIBSMBIOS_C_DLL_SPEC int token_obj_try_password (const struct token_obj *, const char *pass_ascii, const char *pass_scancode)
 
LIBSMBIOS_C_DLL_SPEC const void * token_obj_get_ptr (const struct token_obj *t)
 

Variables

struct indexed_io_token LIBSMBIOS_C_PACKED_ATTR
 

Macro Definition Documentation

◆ TOKEN_DEFAULTS

#define TOKEN_DEFAULTS   0x0000

◆ TOKEN_GET_NEW

#define TOKEN_GET_NEW   0x0002

◆ TOKEN_GET_SINGLETON

#define TOKEN_GET_SINGLETON   0x0001

◆ TOKEN_NO_ERR_CLEAR

#define TOKEN_NO_ERR_CLEAR   0x0008

◆ token_table_for_each

#define token_table_for_each (   table_name,
  struct_name 
)
Value:
for( \
const struct token_obj *struct_name = token_table_get_next(table_name, 0);\
struct_name;\
struct_name = token_table_get_next(table_name, struct_name)\
)
LIBSMBIOS_C_DLL_SPEC const struct token_obj * token_table_get_next(const struct token_table *, const struct token_obj *cur)

◆ token_table_for_each_id

#define token_table_for_each_id (   table_name,
  struct_name,
  id 
)
Value:
for( \
const struct token_obj *struct_name = token_table_get_next_id(table_name, 0, id);\
struct_name;\
struct_name = token_table_get_next_id(table_name, struct_name, id)\
)

◆ TOKEN_UNIT_TEST_MODE

#define TOKEN_UNIT_TEST_MODE   0x0004

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CHECK_TYPE_WORD_CHECKSUM 
CHECK_TYPE_BYTE_CHECKSUM 
CHECK_TYPE_WORD_CRC 
CHECK_TYPE_WORD_CHECKSUM_N 

Function Documentation

◆ token_obj_activate()

LIBSMBIOS_C_DLL_SPEC int token_obj_activate ( const struct token_obj *  )

◆ token_obj_get_id()

LIBSMBIOS_C_DLL_SPEC u16 token_obj_get_id ( const struct token_obj *  )

◆ token_obj_get_ptr()

LIBSMBIOS_C_DLL_SPEC const void * token_obj_get_ptr ( const struct token_obj *  t)

◆ token_obj_get_smbios_struct()

LIBSMBIOS_C_DLL_SPEC const struct smbios_struct * token_obj_get_smbios_struct ( const struct token_obj *  )

◆ token_obj_get_string()

LIBSMBIOS_C_DLL_SPEC char * token_obj_get_string ( const struct token_obj *  ,
size_t *  len 
)

◆ token_obj_get_type()

LIBSMBIOS_C_DLL_SPEC int token_obj_get_type ( const struct token_obj *  )

◆ token_obj_is_active()

LIBSMBIOS_C_DLL_SPEC int token_obj_is_active ( const struct token_obj *  )

◆ token_obj_is_bool()

LIBSMBIOS_C_DLL_SPEC bool token_obj_is_bool ( const struct token_obj *  )

◆ token_obj_is_string()

LIBSMBIOS_C_DLL_SPEC bool token_obj_is_string ( const struct token_obj *  )

◆ token_obj_set_string()

LIBSMBIOS_C_DLL_SPEC int token_obj_set_string ( const struct token_obj *  ,
const char *  ,
size_t  size 
)

◆ token_obj_strerror()

LIBSMBIOS_C_DLL_SPEC const char * token_obj_strerror ( const struct token_obj *  )

◆ token_obj_try_password()

LIBSMBIOS_C_DLL_SPEC int token_obj_try_password ( const struct token_obj *  ,
const char *  pass_ascii,
const char *  pass_scancode 
)

◆ token_table_factory()

LIBSMBIOS_C_DLL_SPEC struct token_table * token_table_factory ( int  flags,
  ... 
)

◆ token_table_free()

LIBSMBIOS_C_DLL_SPEC void token_table_free ( struct token_table *  )

◆ token_table_get_next()

LIBSMBIOS_C_DLL_SPEC const struct token_obj * token_table_get_next ( const struct token_table *  ,
const struct token_obj *  cur 
)

◆ token_table_get_next_by_id()

LIBSMBIOS_C_DLL_SPEC const struct token_obj * token_table_get_next_by_id ( const struct token_table *  ,
const struct token_obj *  cur,
u16  id 
)

◆ token_table_strerror()

LIBSMBIOS_C_DLL_SPEC const char * token_table_strerror ( const struct token_table *  )

Variable Documentation

◆ LIBSMBIOS_C_PACKED_ATTR

struct dell_protected_value_2_structure LIBSMBIOS_C_PACKED_ATTR