ng_car - Commited Access Rate netgraph node type
Traffic flowing from upper to lower is considered downstream traffic. Traffic flowing from lower to upper is considered upstream traffic.
This algorithm is more polite to the TCP traffic than NG_CAR_SINGLE_RATE.
Traffic shaping is much more polite to the TCP traffic than rate limit on links with bandwidth * delay product less than 6-8 TCP segments, but it consumes additional system resources for queue processing.
struct ng_car_hookconf {
u_int64_t cbs; /* Committed burst size (bytes) */
u_int64_t ebs; /* Exceeded/Peak burst size (bytes) */
u_int64_t cir; /* Committed information rate (bits/s) */
u_int64_t pir; /* Peak information rate (bits/s) */
u_int8_t green_action; /* Action for green packets */
u_int8_t yellow_action; /* Action for yellow packets */
u_int8_t red_action; /* Action for red packets */
u_int8_t mode; /* single/double rate, ... */
u_int8_t opt; /* color-aware or color-blind */
};
struct ng_car_bulkconf {
struct ng_car_hookconf upstream;
struct ng_car_hookconf downstream;
};
struct ng_car_hookstats {
u_int64_t passed_pkts;
u_int64_t droped_pkts;
u_int64_t green_pkts;
u_int64_t yellow_pkts;
u_int64_t red_pkts;
u_int64_t errors;
};
struct ng_car_bulkstats {
struct ng_car_hookstats upstream;
struct ng_car_hookstats downstream;
};