The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
libip4tc.c File Reference
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "libiptc.h"
#include "libiptc.c"
Include dependency graph for libip4tc.c:

Macros

#define IP_VERSION   4
 
#define IP_OFFSET   0x1FFF
 
#define HOOK_PRE_ROUTING   NF_IP_PRE_ROUTING
 
#define HOOK_LOCAL_IN   NF_IP_LOCAL_IN
 
#define HOOK_FORWARD   NF_IP_FORWARD
 
#define HOOK_LOCAL_OUT   NF_IP_LOCAL_OUT
 
#define HOOK_POST_ROUTING   NF_IP_POST_ROUTING
 
#define STRUCT_ENTRY_TARGET   struct ipt_entry_target
 
#define STRUCT_ENTRY   struct ipt_entry
 
#define STRUCT_ENTRY_MATCH   struct ipt_entry_match
 
#define STRUCT_GETINFO   struct ipt_getinfo
 
#define STRUCT_GET_ENTRIES   struct ipt_get_entries
 
#define STRUCT_COUNTERS   struct ipt_counters
 
#define STRUCT_COUNTERS_INFO   struct ipt_counters_info
 
#define STRUCT_STANDARD_TARGET   struct ipt_standard_target
 
#define STRUCT_REPLACE   struct ipt_replace
 
#define STRUCT_TC_HANDLE   struct iptc_handle
 
#define TC_HANDLE_T   iptc_handle_t
 
#define ENTRY_ITERATE   IPT_ENTRY_ITERATE
 
#define TABLE_MAXNAMELEN   IPT_TABLE_MAXNAMELEN
 
#define FUNCTION_MAXNAMELEN   IPT_FUNCTION_MAXNAMELEN
 
#define GET_TARGET   ipt_get_target
 
#define ERROR_TARGET   IPT_ERROR_TARGET
 
#define NUMHOOKS   NF_IP_NUMHOOKS
 
#define IPT_CHAINLABEL   ipt_chainlabel
 
#define TC_DUMP_ENTRIES   dump_entries
 
#define TC_IS_CHAIN   iptc_is_chain
 
#define TC_FIRST_CHAIN   iptc_first_chain
 
#define TC_NEXT_CHAIN   iptc_next_chain
 
#define TC_FIRST_RULE   iptc_first_rule
 
#define TC_NEXT_RULE   iptc_next_rule
 
#define TC_GET_TARGET   iptc_get_target
 
#define TC_BUILTIN   iptc_builtin
 
#define TC_GET_POLICY   iptc_get_policy
 
#define TC_INSERT_ENTRY   iptc_insert_entry
 
#define TC_REPLACE_ENTRY   iptc_replace_entry
 
#define TC_APPEND_ENTRY   iptc_append_entry
 
#define TC_DELETE_ENTRY   iptc_delete_entry
 
#define TC_DELETE_NUM_ENTRY   iptc_delete_num_entry
 
#define TC_CHECK_PACKET   iptc_check_packet
 
#define TC_FLUSH_ENTRIES   iptc_flush_entries
 
#define TC_ZERO_ENTRIES   iptc_zero_entries
 
#define TC_READ_COUNTER   iptc_read_counter
 
#define TC_ZERO_COUNTER   iptc_zero_counter
 
#define TC_SET_COUNTER   iptc_set_counter
 
#define TC_CREATE_CHAIN   iptc_create_chain
 
#define TC_GET_REFERENCES   iptc_get_references
 
#define TC_DELETE_CHAIN   iptc_delete_chain
 
#define TC_RENAME_CHAIN   iptc_rename_chain
 
#define TC_SET_POLICY   iptc_set_policy
 
#define TC_GET_RAW_SOCKET   iptc_get_raw_socket
 
#define TC_INIT   iptc_init
 
#define TC_FREE   iptc_free
 
#define TC_COMMIT   iptc_commit
 
#define TC_STRERROR   iptc_strerror
 
#define TC_AF   AF_INET
 
#define TC_IPPROTO   IPPROTO_IP
 
#define SO_SET_REPLACE   IPT_SO_SET_REPLACE
 
#define SO_SET_ADD_COUNTERS   IPT_SO_SET_ADD_COUNTERS
 
#define SO_GET_INFO   IPT_SO_GET_INFO
 
#define SO_GET_ENTRIES   IPT_SO_GET_ENTRIES
 
#define SO_GET_VERSION   IPT_SO_GET_VERSION
 
#define STANDARD_TARGET   IPT_STANDARD_TARGET
 
#define LABEL_RETURN   IPTC_LABEL_RETURN
 
#define LABEL_ACCEPT   IPTC_LABEL_ACCEPT
 
#define LABEL_DROP   IPTC_LABEL_DROP
 
#define LABEL_QUEUE   IPTC_LABEL_QUEUE
 
#define ALIGN   IPT_ALIGN
 
#define RETURN   IPT_RETURN
 
#define IP_PARTS_NATIVE(n)
 
#define IP_PARTS(n)   IP_PARTS_NATIVE(ntohl(n))
 

Typedefs

typedef unsigned int socklen_t
 

Functions

static unsigned char * is_same (const struct ipt_entry *a, const struct ipt_entry *b, unsigned char *matchmask)
 

Macro Definition Documentation

#define ALIGN   IPT_ALIGN
#define ENTRY_ITERATE   IPT_ENTRY_ITERATE
#define ERROR_TARGET   IPT_ERROR_TARGET
#define FUNCTION_MAXNAMELEN   IPT_FUNCTION_MAXNAMELEN
#define GET_TARGET   ipt_get_target
#define HOOK_FORWARD   NF_IP_FORWARD
#define HOOK_LOCAL_IN   NF_IP_LOCAL_IN
#define HOOK_LOCAL_OUT   NF_IP_LOCAL_OUT
#define HOOK_POST_ROUTING   NF_IP_POST_ROUTING
#define HOOK_PRE_ROUTING   NF_IP_PRE_ROUTING
#define IP_OFFSET   0x1FFF
#define IP_PARTS (   n)    IP_PARTS_NATIVE(ntohl(n))
#define IP_PARTS_NATIVE (   n)
Value:
(unsigned int)((n)>>24)&0xFF, \
(unsigned int)((n)>>16)&0xFF, \
(unsigned int)((n)>>8)&0xFF, \
(unsigned int)((n)&0xFF)
#define IP_VERSION   4
#define IPT_CHAINLABEL   ipt_chainlabel
#define LABEL_ACCEPT   IPTC_LABEL_ACCEPT
#define LABEL_DROP   IPTC_LABEL_DROP
#define LABEL_QUEUE   IPTC_LABEL_QUEUE
#define LABEL_RETURN   IPTC_LABEL_RETURN
#define NUMHOOKS   NF_IP_NUMHOOKS
#define RETURN   IPT_RETURN
#define SO_GET_ENTRIES   IPT_SO_GET_ENTRIES
#define SO_GET_INFO   IPT_SO_GET_INFO
#define SO_GET_VERSION   IPT_SO_GET_VERSION
#define SO_SET_ADD_COUNTERS   IPT_SO_SET_ADD_COUNTERS
#define SO_SET_REPLACE   IPT_SO_SET_REPLACE
#define STANDARD_TARGET   IPT_STANDARD_TARGET
#define STRUCT_COUNTERS   struct ipt_counters
#define STRUCT_COUNTERS_INFO   struct ipt_counters_info
#define STRUCT_ENTRY   struct ipt_entry
#define STRUCT_ENTRY_MATCH   struct ipt_entry_match
#define STRUCT_ENTRY_TARGET   struct ipt_entry_target
#define STRUCT_GET_ENTRIES   struct ipt_get_entries
#define STRUCT_GETINFO   struct ipt_getinfo
#define STRUCT_REPLACE   struct ipt_replace
#define STRUCT_STANDARD_TARGET   struct ipt_standard_target
#define STRUCT_TC_HANDLE   struct iptc_handle
#define TABLE_MAXNAMELEN   IPT_TABLE_MAXNAMELEN
#define TC_AF   AF_INET
#define TC_APPEND_ENTRY   iptc_append_entry
#define TC_BUILTIN   iptc_builtin
#define TC_CHECK_PACKET   iptc_check_packet
#define TC_COMMIT   iptc_commit
#define TC_CREATE_CHAIN   iptc_create_chain
#define TC_DELETE_CHAIN   iptc_delete_chain
#define TC_DELETE_ENTRY   iptc_delete_entry
#define TC_DELETE_NUM_ENTRY   iptc_delete_num_entry
#define TC_DUMP_ENTRIES   dump_entries
#define TC_FIRST_CHAIN   iptc_first_chain
#define TC_FIRST_RULE   iptc_first_rule
#define TC_FLUSH_ENTRIES   iptc_flush_entries
#define TC_FREE   iptc_free
#define TC_GET_POLICY   iptc_get_policy
#define TC_GET_RAW_SOCKET   iptc_get_raw_socket
#define TC_GET_REFERENCES   iptc_get_references
#define TC_GET_TARGET   iptc_get_target
#define TC_HANDLE_T   iptc_handle_t
#define TC_INIT   iptc_init
#define TC_INSERT_ENTRY   iptc_insert_entry
#define TC_IPPROTO   IPPROTO_IP
#define TC_IS_CHAIN   iptc_is_chain
#define TC_NEXT_CHAIN   iptc_next_chain
#define TC_NEXT_RULE   iptc_next_rule
#define TC_READ_COUNTER   iptc_read_counter
#define TC_RENAME_CHAIN   iptc_rename_chain
#define TC_REPLACE_ENTRY   iptc_replace_entry
#define TC_SET_COUNTER   iptc_set_counter
#define TC_SET_POLICY   iptc_set_policy
#define TC_STRERROR   iptc_strerror
#define TC_ZERO_COUNTER   iptc_zero_counter
#define TC_ZERO_ENTRIES   iptc_zero_entries

Typedef Documentation

typedef unsigned int socklen_t

Function Documentation

static unsigned char* is_same ( const struct ipt_entry *  a,
const struct ipt_entry *  b,
unsigned char *  matchmask 
)
static

Here is the call graph for this function: