1e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher#ifndef _IPTABLES_USER_H 2e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher#define _IPTABLES_USER_H 3e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher 4ef18e8147903885708d1c264904129af4fb636d6Jan Engelhardt#include <netinet/ip.h> 5ef18e8147903885708d1c264904129af4fb636d6Jan Engelhardt#include <xtables.h> 6ef18e8147903885708d1c264904129af4fb636d6Jan Engelhardt#include <libiptc/libiptc.h> 7c02e80878979d2205f3d89d05548397871e598e9Jan Engelhardt#include <iptables/internal.h> 8e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher 9e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher/* Your shared library should call one of these. */ 10c1e04bd1b057151afaf7e6138089f2fe2c1b7d1cMaciej Zenczykowskiextern int do_command4(int argc, char *argv[], char **table, 11fd1873110f8e57be578df17fc9d03536b10f4f73Jan Engelhardt struct iptc_handle **handle); 12e5c061afabf018634a507f00df5b1d0c4bd53a37Maciej Zenczykowskiextern int delete_chain4(const ipt_chainlabel chain, int verbose, 131c9015b2cb483678f153121255e10ec0bbfde3e6Jan Engelhardt struct iptc_handle *handle); 14cc38d058d14e84d3008a0c0035348e0ad5f0d5d2Maciej Zenczykowskiextern int flush_entries4(const ipt_chainlabel chain, int verbose, 151c9015b2cb483678f153121255e10ec0bbfde3e6Jan Engelhardt struct iptc_handle *handle); 16e70844a98d125679cfe0c62e48d0f19bf175280dMaciej Zenczykowskiextern int for_each_chain4(int (*fn)(const ipt_chainlabel, int, struct iptc_handle *), 171c9015b2cb483678f153121255e10ec0bbfde3e6Jan Engelhardt int verbose, int builtinstoo, struct iptc_handle *handle); 18bb9fe8059f40f0dde9c780498f5af42f5aa6a179Maciej Zenczykowskiextern void print_rule4(const struct ipt_entry *e, 191c9015b2cb483678f153121255e10ec0bbfde3e6Jan Engelhardt struct iptc_handle *handle, const char *chain, int counters); 208cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester 218cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester/* kernel revision handling */ 228cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oesterextern int kernel_version; 238cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oesterextern void get_kernel_version(void); 248cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) 258cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester#define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF) 268cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester#define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF) 278cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester#define LINUX_VERSION_PATCH(x) ( (x) & 0xFF) 288cf65913bb6353bf0e92eab0669d1c4c53b43623Phil Oester 29617d3d140f4739558dce2ef8ed01aef251cf5487Jamal Hadi Salimextern struct xtables_globals iptables_globals; 30617d3d140f4739558dce2ef8ed01aef251cf5487Jamal Hadi Salim 31e6869a8f59d779ff4d5a0984c86d80db7078496Marc Boucher#endif /*_IPTABLES_USER_H*/ 32