Lines Matching defs:qdisc
19 * // Specify the maximal number of bands to be used for this PRIO qdisc.
20 * rtnl_qdisc_prio_set_bands(qdisc, QDISC_PRIO_DEFAULT_BANDS);
24 * rtnl_qdisc_prio_set_priomap(qdisc, map, sizeof(map));
33 #include <netlink/route/qdisc.h>
34 #include <netlink/route/qdisc-modules.h>
42 static inline struct rtnl_prio *prio_qdisc(struct rtnl_qdisc *qdisc)
44 return (struct rtnl_prio *) qdisc->q_subdata;
47 static inline struct rtnl_prio *prio_alloc(struct rtnl_qdisc *qdisc)
49 if (!qdisc->q_subdata)
50 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_prio));
52 return prio_qdisc(qdisc);
55 static int prio_msg_parser(struct rtnl_qdisc *qdisc)
60 if (qdisc->q_opts->d_size < sizeof(*opt))
63 prio = prio_alloc(qdisc);
67 opt = (struct tc_prio_qopt *) qdisc->q_opts->d_data;
75 static void prio_free_data(struct rtnl_qdisc *qdisc)
77 free(qdisc->q_subdata);
80 static void prio_dump_line(struct rtnl_qdisc *qdisc, struct nl_dump_params *p)
82 struct rtnl_prio *prio = prio_qdisc(qdisc);
88 static void prio_dump_details(struct rtnl_qdisc *qdisc,struct nl_dump_params *p)
90 struct rtnl_prio *prio = prio_qdisc(qdisc);
124 static struct nl_msg *prio_get_opts(struct rtnl_qdisc *qdisc)
130 prio = prio_qdisc(qdisc);
158 * Set number of bands of PRIO qdisc.
159 * @arg qdisc PRIO qdisc to be modified.
163 int rtnl_qdisc_prio_set_bands(struct rtnl_qdisc *qdisc, int bands)
167 prio = prio_alloc(qdisc);
178 * Get number of bands of PRIO qdisc.
179 * @arg qdisc PRIO qdisc.
182 int rtnl_qdisc_prio_get_bands(struct rtnl_qdisc *qdisc)
186 prio = prio_qdisc(qdisc);
194 * Set priomap of the PRIO qdisc.
195 * @arg qdisc PRIO qdisc to be modified.
200 int rtnl_qdisc_prio_set_priomap(struct rtnl_qdisc *qdisc, uint8_t priomap[],
206 prio = prio_alloc(qdisc);
228 * Get priomap of a PRIO qdisc.
229 * @arg qdisc PRIO qdisc.
233 uint8_t *rtnl_qdisc_prio_get_priomap(struct rtnl_qdisc *qdisc)
237 prio = prio_qdisc(qdisc);