iPXE
Data Fields
setting_type Struct Reference

A setting type. More...

#include <settings.h>

Data Fields

const char * name
 Name. More...
 
int(* parse )(const struct setting_type *type, const char *value, void *buf, size_t len)
 Parse formatted string to setting value. More...
 
int(* format )(const struct setting_type *type, const void *raw, size_t raw_len, char *buf, size_t len)
 Format setting value as a string. More...
 
int(* denumerate )(const struct setting_type *type, unsigned long value, void *buf, size_t len)
 Convert number to setting value. More...
 
int(* numerate )(const struct setting_type *type, const void *raw, size_t raw_len, unsigned long *value)
 Convert setting value to number. More...
 

Detailed Description

A setting type.

This represents a type of setting (e.g. string, IPv4 address, etc.).

Definition at line 191 of file settings.h.

Field Documentation

◆ name

const char* setting_type::name

Name.

This is the name exposed to the user (e.g. "string").

Definition at line 196 of file settings.h.

Referenced by setting_name().

◆ parse

int( * setting_type::parse) (const struct setting_type *type, const char *value, void *buf, size_t len)

Parse formatted string to setting value.

Parameters
typeSetting type
valueFormatted setting value
bufBuffer to contain raw value
lenLength of buffer
Return values
lenLength of raw value, or negative error

Definition at line 205 of file settings.h.

◆ format

int( * setting_type::format) (const struct setting_type *type, const void *raw, size_t raw_len, char *buf, size_t len)

Format setting value as a string.

Parameters
typeSetting type
rawRaw setting value
raw_lenLength of raw setting value
bufBuffer to contain formatted value
lenLength of buffer
Return values
lenLength of formatted value, or negative error

Definition at line 216 of file settings.h.

◆ denumerate

int( * setting_type::denumerate) (const struct setting_type *type, unsigned long value, void *buf, size_t len)

Convert number to setting value.

Parameters
typeSetting type
valueNumeric value
bufBuffer to contain raw value
lenLength of buffer
Return values
lenLength of raw value, or negative error

Definition at line 226 of file settings.h.

◆ numerate

int( * setting_type::numerate) (const struct setting_type *type, const void *raw, size_t raw_len, unsigned long *value)

Convert setting value to number.

Parameters
typeSetting type
rawRaw setting value
raw_lenLength of raw setting value
valueNumeric value to fill in
Return values
rcReturn status code

Definition at line 237 of file settings.h.

Referenced by acpi_settings_fetch().


The documentation for this struct was generated from the following file: