2010-07-02 14:06:59 +02:00
|
|
|
/*
|
|
|
|
* netlink/route/pktloc.h Packet Location Aliasing
|
|
|
|
*
|
|
|
|
* 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 version 2.1
|
|
|
|
* of the License.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NETLINK_PKTLOC_H_
|
|
|
|
#define NETLINK_PKTLOC_H_
|
|
|
|
|
|
|
|
#include <netlink/netlink.h>
|
|
|
|
#include <netlink/cache.h>
|
|
|
|
#include <netlink/route/tc.h>
|
|
|
|
|
|
|
|
#include <linux/tc_ematch/tc_em_cmp.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct rtnl_pktloc
|
|
|
|
{
|
|
|
|
char * name;
|
2010-10-27 01:21:50 +02:00
|
|
|
uint8_t layer;
|
2010-11-04 20:01:36 +01:00
|
|
|
uint8_t shift;
|
2010-07-02 14:06:59 +02:00
|
|
|
uint16_t offset;
|
2010-10-29 00:14:34 +02:00
|
|
|
uint16_t align;
|
2010-07-02 14:06:59 +02:00
|
|
|
uint32_t mask;
|
2010-10-27 01:21:50 +02:00
|
|
|
uint32_t refcnt;
|
2010-07-02 14:06:59 +02:00
|
|
|
|
|
|
|
struct nl_list_head list;
|
|
|
|
};
|
|
|
|
|
2010-10-27 01:21:50 +02:00
|
|
|
extern int rtnl_pktloc_lookup(const char *, struct rtnl_pktloc **);
|
2010-10-29 00:14:34 +02:00
|
|
|
extern struct rtnl_pktloc *rtnl_pktloc_alloc(void);
|
2010-10-27 01:21:50 +02:00
|
|
|
extern void rtnl_pktloc_put(struct rtnl_pktloc *);
|
|
|
|
extern int rtnl_pktloc_add(struct rtnl_pktloc *);
|
|
|
|
extern void rtnl_pktloc_foreach(void (*cb)(struct rtnl_pktloc *, void *),
|
|
|
|
void *);
|
2010-07-02 14:06:59 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|