File: nlmon.h

package info (click to toggle)
iwd 3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,164 kB
  • sloc: ansic: 140,705; sh: 5,514; makefile: 714
file content (58 lines) | stat: -rw-r--r-- 1,802 bytes parent folder | download | duplicates (3)
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
/*
 *
 *  Wireless daemon for Linux
 *
 *  Copyright (C) 2013-2019  Intel Corporation. All rights reserved.
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library 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
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#include <stdint.h>
#include <sys/time.h>

struct nlmon;

enum time_format {
	TIME_FORMAT_DELTA,
	TIME_FORMAT_UTC,
};

struct nlmon_config {
	bool nortnl;
	bool nowiphy;
	bool noscan;
	bool noies;
	bool read_only;
	enum time_format time_format;

	/* File size in MB */
	uint32_t pcap_file_size;
	uint32_t pcap_file_count;
};

struct nlmon *nlmon_open(uint16_t id, const char *pathname,
				const struct nlmon_config *config);
void nlmon_close(struct nlmon *nlmon);

struct nlmon *nlmon_create(uint16_t id, const struct nlmon_config *config);
void nlmon_destroy(struct nlmon *nlmon);
void nlmon_print_rtnl(struct nlmon *nlmon, const struct timeval *tv,
					const void *data, uint32_t size);
void nlmon_print_genl(struct nlmon *nlmon, const struct timeval *tv,
					const void *data, int64_t size);
void nlmon_print_pae(struct nlmon *nlmon, const struct timeval *tv,
					uint8_t type, int index,
					const void *data, uint32_t size);