From 1cc762aa8f89a5e4324f1482d97affa5ef6298bd Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 13 Jun 2014 14:53:00 +0200 Subject: lookup: Move UDP/TCP port and Ethernet type lookup into own module Up to now, the lookup of TCP/UDP port names and Ethernet types was tightly integrated with the dissector infrastructure, since it is its main user. However, flowtop also makes use of the name lookup functionality without needing the actual dissector infrastructure. Thus, the basic dissector infrastructure also needs to be linked into flowtop without actually being used. Fix this by extracting the port/ethertype lookup into an own module which can then be used either directly (for flowtop) or as part of the dissector infrastructure (for netsniff-ng). This also reverts the quick & dirty fix introduced in commit f3322c6 ("flowtop: Include netlink dissector to fix build temporarily"). Signed-off-by: Tobias Klauser --- lookup.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lookup.h (limited to 'lookup.h') diff --git a/lookup.h b/lookup.h new file mode 100644 index 0000000..7cc2d31 --- /dev/null +++ b/lookup.h @@ -0,0 +1,25 @@ +/* + * netsniff-ng - the packet sniffing beast + * Copyright 2009, 2010 Daniel Borkmann. + * Copyright 2014 Tobias Klauser + * Subject to the GPL, version 2. + */ + +#ifndef LOOKUP_H +#define LOOKUP_H + +enum ports { + PORTS_UDP, + PORTS_TCP, + PORTS_ETHER, + PORTS_MAX, +}; + +extern void lookup_init_ports(enum ports which); +extern void lookup_cleanup_ports(enum ports which); + +extern char *lookup_port_udp(unsigned int id); +extern char *lookup_port_tcp(unsigned int id); +extern char *lookup_ether_type(unsigned int id); + +#endif /* LOOKUP_H */ -- cgit v1.2.3-54-g00ecf xt.git/tree/?id=d524d84b588e300418a99794eb5066683ec7c488'>treecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-08-21 15:24:33 +0100
committerDavid S. Miller <davem@davemloft.net>2016-08-21 15:21:36 -0700
commitd524d84b588e300418a99794eb5066683ec7c488 (patch)
tree86a4e0b9e0fea79e916b0ba9e8621ad64b2725a0
parent5575cf133cf7f564da991595c6bc9344afa7d89a (diff)
net: tehuti: fix typo: "eneble" -> "enable"
trivial typo fix in pr_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>