summaryrefslogtreecommitdiff
path: root/lookup.h
blob: 38161b6c175d33857bfbe9902a51432253ef0495 (plain)
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
/*
 * netsniff-ng - the packet sniffing beast
 * Copyright 2009, 2010 Daniel Borkmann.
 * Copyright 2014, 2015 Tobias Klauser
 * Subject to the GPL, version 2.
 */

#ifndef LOOKUP_H
#define LOOKUP_H

enum lookup_type {
	LT_PORTS_UDP,
	LT_PORTS_TCP,
	LT_ETHERTYPES,
	LT_OUI,
	LT_MAX,
};

extern void lookup_init(enum lookup_type which);
extern void lookup_cleanup(enum lookup_type which);

extern const char *lookup_port_udp(unsigned int id);
extern const char *lookup_port_tcp(unsigned int id);
extern const char *lookup_ether_type(unsigned int id);
extern const char *lookup_vendor(unsigned int id);

static inline const char *lookup_vendor_str(unsigned int id)
{
	return lookup_vendor(id) ? : "Unknown";
}

#endif /* LOOKUP_H */
bed499815938308bdab9aae70dd561 (patch) tree4dd2519edf64288329c6f00b3c20f7dca9fa0593 /Documentation/devicetree/bindings parent07d9a380680d1c0eb51ef87ff2eab5c994949e69 (diff)
kernfs: Add noop_fsync to supported kernfs_file_fops
If you edit a kernfs backed file with vi(1), you see an ugly error message when you write the file because vi tries to fsync(2) the file after writing, which fails. We have noop_fsync() for this, use it. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/devicetree/bindings')