libnl  3.7.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 <netlink/cli/utils.h>
13 #include <netlink/cli/qdisc.h>
14 #include <netlink/route/class.h>
15 
16 struct rtnl_qdisc *nl_cli_qdisc_alloc(void)
17 {
18  struct rtnl_qdisc *qdisc;
19 
20  if (!(qdisc = rtnl_qdisc_alloc()))
21  nl_cli_fatal(ENOMEM, "Unable to allocate qdisc object");
22 
23  return qdisc;
24 }
25 
26 /** @} */
void nl_cli_fatal(int err, const char *fmt,...)
Print error message and quit application.
Definition: utils.c:71