Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* SPDX-License-Identifier: GPL-2.0 */
/*
* qosmngr.h - definitions used in qosmngr
*
* Copyright (C) 2020 iopsys Software Solutions AB. All rights reserved.
*
* Author: Oskar Viljasaar <oskar.viljasaar@iopsys.eu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef QOSMNGR_H
#define QOSMNGR_H
/* Needed to get the IFNAMSIZ define */
#include <net/if.h>
#include <qos.h>
/* UCI definitions, used to parse the config files at their right location */
#define UCI_CONFIG_QOS "qos"
#define QOS_SECTION_NAME "queue"
#define OPT_ENABLE "enable"
#define OPT_IFNAME "ifname"
#define OPT_PRECEDENCE "precedence"
#define OPT_SCHEDULING "scheduling"
#define OPT_RATE "rate"
#define OPT_BURST_SIZE "burst_size"
#define OPT_WEIGHT "weight"
/* A QoS queue. */
struct qos_queue {
char name[IFNAMSIZ];
bool enable;
struct qos_queue_config config;
};
int qosmngr_publish_object(struct ubus_context *ctx);
int qosmngr_get_status(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_request_data *req, const char *method,
struct blob_attr *msg);
#endif /* QOSMNGR_H */