0
사용자 공간에서 실행되는 일부 qdisc 정책 "tc"유틸리티를 사용하도록 커널 API를 찾는 데 문제가 있습니다.커널에서 qdisc를 관리하는 방법
net/sched/sch _ *. c에서 모듈을 찾았지만 사용 방법을 잘 모르겠습니다.
예를 들어, TBF를 사용하려면 코드에서 다음과 같이해야합니까?
static struct Qdisc_ops tbf_qdisc_ops __read_mostly = {
.next = NULL,
.cl_ops = &tbf_class_ops,
.id = "tbf",
.priv_size = sizeof(struct tbf_sched_data),
.enqueue = tbf_enqueue,
.dequeue = tbf_dequeue,
.peek = qdisc_peek_dequeued,
.drop = tbf_drop,
.init = tbf_init,
.reset = tbf_reset,
.destroy = tbf_destroy,
.change = tbf_change,
.dump = tbf_dump,
.owner = THIS_MODULE,
}}; register_qdisc (& tbf_qdisc_ops); 충분하니? qdisc를 네트워크 장치에 연결하려면 어떻게합니까?