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