1db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf/*
2db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf * netlink/route/pktloc.h         Packet Location Aliasing
3db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *
4db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *	This library is free software; you can redistribute it and/or
5db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *	modify it under the terms of the GNU Lesser General Public
6db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *	License as published by the Free Software Foundation version 2.1
7db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *	of the License.
8db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf *
9db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
10db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf */
11db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
12db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#ifndef NETLINK_PKTLOC_H_
13db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#define NETLINK_PKTLOC_H_
14db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
15db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#include <netlink/netlink.h>
16db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#include <netlink/cache.h>
17db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#include <netlink/route/tc.h>
18db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
19db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#include <linux/tc_ematch/tc_em_cmp.h>
20db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
21db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#ifdef __cplusplus
22db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Grafextern "C" {
23db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#endif
24db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
25db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Grafstruct rtnl_pktloc
26db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf{
27db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	char *			name;
28db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	uint8_t			align:4;
29db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	uint8_t			layer:4;
30db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	uint8_t			flags;
31db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	uint16_t		offset;
32db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	uint32_t		mask;
33db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
34db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf	struct nl_list_head	list;
35db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf};
36db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
37db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Grafextern int rtnl_pktloc_lookup(const char *, struct rtnl_pktloc **);
38db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
39db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
40db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#ifdef __cplusplus
41db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf}
42db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#endif
43db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf
44db5bd57899affbcaf42ac0b93c5c7be8f51ca390Thomas Graf#endif
45