2023-09-04 12:21:37 +02:00
|
|
|
/* Netlink Types (Private).
|
2023-08-31 11:25:01 +02:00
|
|
|
*
|
|
|
|
* Copied from: https://github.com/tgraf/libnl/blob/master/include/netlink-private/types.h
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: LGPL-2.1-only
|
|
|
|
* SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
|
|
|
|
* SPDX-FileCopyrightText: 2003-2013 Thomas Graf <tgraf@suug.ch>
|
|
|
|
* SPDX-FileCopyrightText: 2013 Sassano Systems LLC <joe@sassanosystems.com>
|
|
|
|
*/
|
|
|
|
|
2017-12-20 11:23:55 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-06-28 13:42:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-12-20 11:23:55 +01:00
|
|
|
#define SCH_NETEM_ATTR_DIST 0x2000
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
struct rtnl_netem_corr {
|
|
|
|
uint32_t nmc_delay;
|
|
|
|
uint32_t nmc_loss;
|
|
|
|
uint32_t nmc_duplicate;
|
2017-12-20 11:23:55 +01:00
|
|
|
};
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
struct rtnl_netem_reo {
|
|
|
|
uint32_t nmro_probability;
|
|
|
|
uint32_t nmro_correlation;
|
2017-12-20 11:23:55 +01:00
|
|
|
};
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
struct rtnl_netem_crpt {
|
|
|
|
uint32_t nmcr_probability;
|
|
|
|
uint32_t nmcr_correlation;
|
2017-12-20 11:23:55 +01:00
|
|
|
};
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
struct rtnl_netem_dist {
|
|
|
|
int16_t *dist_data;
|
|
|
|
size_t dist_size;
|
2017-12-20 11:23:55 +01:00
|
|
|
};
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
struct rtnl_netem {
|
|
|
|
uint32_t qnm_latency;
|
|
|
|
uint32_t qnm_limit;
|
|
|
|
uint32_t qnm_loss;
|
|
|
|
uint32_t qnm_gap;
|
|
|
|
uint32_t qnm_duplicate;
|
|
|
|
uint32_t qnm_jitter;
|
|
|
|
uint32_t qnm_mask;
|
|
|
|
struct rtnl_netem_corr qnm_corr;
|
|
|
|
struct rtnl_netem_reo qnm_ro;
|
|
|
|
struct rtnl_netem_crpt qnm_crpt;
|
|
|
|
struct rtnl_netem_dist qnm_dist;
|
2017-12-20 11:23:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
void *rtnl_tc_data(struct rtnl_tc *tc);
|
2018-06-28 13:42:50 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|