libnl: /data/src/libnl3/src/lib/qdisc.c Source File

libnl 3.10.0

qdisc.c
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2008-2011 Thomas Graf <tgraf@suug.ch>
4 */
5
6/**
7 * @ingroup cli
8 * @defgroup cli_qdisc Queueing Disciplines
9 * @{
10 */
11
12#include "nl-default.h"
13
14#include <netlink/cli/utils.h>
15#include <netlink/cli/qdisc.h>
16#include <netlink/route/class.h>
17
18struct rtnl_qdisc *nl_cli_qdisc_alloc(void)
19{
20 struct rtnl_qdisc *qdisc;
21
22 if (!(qdisc = rtnl_qdisc_alloc()))
23 nl_cli_fatal(ENOMEM, "Unable to allocate qdisc object");
24
25 return qdisc;
26}
27
28/** @} */
nl_cli_fatal
void nl_cli_fatal(int err, const char *fmt,...)
Print error message and quit application.
Definition utils.c:71
rtnl_qdisc
Definition nl-route.h:118