/* Option flags: * BOND_OPTFLAG_NOSLAVES - check if the bond device is empty before setting * BOND_OPTFLAG_IFDOWN - check if the bond device is down before setting * BOND_OPTFLAG_RAWVAL - the option parses the value itself
*/ enum {
BOND_OPTFLAG_NOSLAVES = BIT(0),
BOND_OPTFLAG_IFDOWN = BIT(1),
BOND_OPTFLAG_RAWVAL = BIT(2)
};
/* Value type flags: * BOND_VALFLAG_DEFAULT - mark the value as default * BOND_VALFLAG_(MIN|MAX) - mark the value as min/max
*/ enum {
BOND_VALFLAG_DEFAULT = BIT(0),
BOND_VALFLAG_MIN = BIT(1),
BOND_VALFLAG_MAX = BIT(2)
};
/* This structure is used for storing option values and for passing option * values when changing an option. The logic when used as an arg is as follows: * - if value != ULLONG_MAX -> parse value * - if string != NULL -> parse string * - if the opt is RAW data and length less than maxlen, * copy the data to extra storage
*/
/* unsuppmodes is used to denote modes in which the option isn't * supported.
*/ unsignedlong unsuppmodes; /* supported values which this option can have, can be a subset of * BOND_OPTVAL_RANGE's value range
*/ conststruct bond_opt_value *values;
int (*set)(struct bonding *bond, conststruct bond_opt_value *val);
};
/* This helper is used to initialize a bond_opt_value structure for parameter * passing. There should be either a valid string or value, but not both. * When value is ULLONG_MAX then string will be used.
*/ staticinlinevoid __bond_opt_init(struct bond_opt_value *optval, char *string, u64 value, void *extra, size_t extra_len)
{
memset(optval, 0, sizeof(*optval));
optval->value = ULLONG_MAX; if (value != ULLONG_MAX)
optval->value = value; elseif (string)
optval->string = string;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.