_cfg
#define ath_hal_btcoex_set_config(_ah, _cfg) \
((*(_ah)->ah_btCoexSetConfig)((_ah), (_cfg)))
#define SIBA_CFG_RID(_dinfo, _cfg) \
(SIBA_CFG_RID_BASE + (_cfg) + \
_rf_id, _no_160, _cores, _cdb, _jacket, _cfg) \
{ .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \
#define IWX_DEV_INFO(_device, _subdevice, _cfg) \
IWX_CFG_ANY, IWX_CFG_ANY, _cfg)
#define VTBLK_GET_CONFIG(_dev, _feature, _field, _cfg) \
&(_cfg)->_field, sizeof((_cfg)->_field)); \
#define VTCON_GET_CONFIG(_dev, _feature, _field, _cfg) \
&(_cfg)->_field, sizeof((_cfg)->_field)); \
#define VTGPU_GET_CONFIG(_dev, _field, _cfg) \
&(_cfg)->_field, sizeof((_cfg)->_field)) \
#define VTSCSI_GET_CONFIG(_dev, _field, _cfg) \
&(_cfg)->_field, sizeof((_cfg)->_field)) \
#define __COPY_STAT_FIELD(_cfg, _stats, _field) \
(_stats)->_field = NAT64STAT_FETCH(&(_cfg)->base.stats, _field)
#define __COPY_STAT_FIELD(_cfg, _stats, _field) \
(_stats)->_field = NAT64STAT_FETCH(&(_cfg)->base.stats, _field)
#define __COPY_STAT_FIELD(_cfg, _stats, _field) \
(_stats)->_field = NAT64STAT_FETCH(&(_cfg)->base.stats, _field)
#define __COPY_STAT_FIELD(_cfg, _stats, _field) \
(_stats)->_field = NPTV6STAT_FETCH(_cfg, _field)
cmd_apply(const struct _cfg *a, const char *arg, struct _qs *q, struct _cfg *dst)
struct _cfg x = a[i];
static struct _cfg delay_cfg[];
static struct _cfg bw_cfg[];
static struct _cfg loss_cfg[];
of the system. For each feature one should define a struct _cfg
if needed, and stores them in the struct _cfg.
struct _cfg has some preallocated space (e.g an array of uint64_t) so simple
- the *_run() function takes struct _q *q and struct _cfg *cfg as arguments.
bandwidth, loss...) the struct _cfg should be added to the array
const_delay_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
const_delay_run(struct _qs *q, struct _cfg *arg)
uniform_delay_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
uniform_delay_run(struct _qs *q, struct _cfg *arg)
exp_delay_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
exp_delay_run(struct _qs *q, struct _cfg *arg)
static struct _cfg delay_cfg[] = {
const_bw_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
const_bw_run(struct _qs *q, struct _cfg *arg)
ether_bw_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
ether_bw_run(struct _qs *q, struct _cfg *arg)
real_bw_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
real_bw_run(struct _qs *q, struct _cfg *arg)
static struct _cfg bw_cfg[] = {
const_plr_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
const_plr_run(struct _qs *q, struct _cfg *arg)
const_ber_parse(struct _qs *q, struct _cfg *dst, int ac, char *av[])
const_ber_run(struct _qs *q, struct _cfg *arg)
static struct _cfg loss_cfg[] = {
int (*parse)(struct _qs *, struct _cfg *, int ac, char *av[]); /* 0 ok, 1 on error */
int (*run)(struct _qs *, struct _cfg *arg); /* 0 Ok, 1 on error */
struct _cfg c_delay;
struct _cfg c_bw;
struct _cfg c_loss;
null_run_fn(struct _qs *q, struct _cfg *cfg)