libnl 3.11.0
ingress.c
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com>
4 */
5
6/**
7 * @ingroup qdisc
8 * @defgroup qdisc_ingress Ingress qdisc
9 *
10 * @{
11 */
12
13#include "nl-default.h"
14
15#include <netlink/netlink.h>
16#include <netlink/route/qdisc.h>
17#include <netlink/utils.h>
18
19#include "tc-api.h"
20
21struct dumb {
22 uint32_t foo;
23};
24
25static int dumb_msg_parser(struct rtnl_tc *tc, void *data)
26{
27 return 0;
28}
29
30static void dumb_dump_line(struct rtnl_tc *tc, void *data,
31 struct nl_dump_params *p)
32{
33}
34
35static int dumb_msg_fill(struct rtnl_tc *tc, void *data, struct nl_msg *msg)
36{
37 return 0;
38}
39
40static struct rtnl_tc_ops ingress_ops = {
41 .to_kind = "ingress",
42 .to_type = RTNL_TC_TYPE_QDISC,
43 .to_size = sizeof(struct dumb),
44 .to_msg_parser = dumb_msg_parser,
45 .to_dump[NL_DUMP_LINE] = dumb_dump_line,
46 .to_msg_fill = dumb_msg_fill,
47};
48
49static void _nl_init ingress_init(void)
50{
51 rtnl_tc_register(&ingress_ops);
52}
53
54static void _nl_exit ingress_exit(void)
55{
56 rtnl_tc_unregister(&ingress_ops);
57}
58
59/** @} */
int rtnl_tc_register(struct rtnl_tc_ops *)
Register a traffic control module.
Definition tc.c:1018
void rtnl_tc_unregister(struct rtnl_tc_ops *)
Unregister a traffic control module.
Definition tc.c:1052
@ NL_DUMP_LINE
Dump object briefly on one line.
Definition types.h:20
Definition ingress.c:21
Dumping parameters.
Definition types.h:32