File: genl_json.h

package info (click to toggle)
batctl 2024.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 844 kB
  • sloc: ansic: 11,893; makefile: 156; sh: 21
file content (30 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (4)
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
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) B.A.T.M.A.N. contributors:
 *
 * Alexander Sarmanow <[email protected]>
 *
 * License-Filename: LICENSES/preferred/GPL-2.0
 */

#ifndef _BATCTL_GENLJSON_H
#define _BATCTL_GENLJSON_H

#include <stdint.h>

#include "batman_adv.h"
#include "netlink.h"

struct json_opts {
	uint8_t is_first:1;
	struct nlquery_opts query_opts;
};

struct json_query_data {
	int nlm_flags;
	enum batadv_nl_commands cmd;
};

void netlink_print_json_entries(struct nlattr *attrs[], struct json_opts *json_opts);
int handle_json_query(struct state *state, int argc, char **argv);

#endif /* _BATCTL_GENLJSON_H */