www.pudn.com > nat.rar > nat.h
#ifndef _NAT_H_
#define _NAT_H_
enum ip_nat_manip_type
{
IP_NAT_MANIP_SRC,
IP_NAT_MANIP_DST
};
#define IP_NAT_RANGE_MAP_IPS 1
#define IP_NAT_RANGE_PROTO_SPECIFIED 2
#define IP_NAT_RANGE_FULL 4
struct ip_nat_range
{
unsigned int flags;
unsigned long min_ip, max_ip;
union ip_conntrack_manip_proto min, max;
};
struct ip_nat_multi_range
{
unsigned int rangesize;
struct ip_nat_range range[1];
};
/*
* In Linux 2.4, static timers have been removed from the kernel.
* Timers may be dynamically created and destroyed, and should be initialized
* by a call to init_timer() upon creation.
*
* The "data" field enables use of a common timeout function for several timeouts.
* You can use this field to distinguish between the different invocations.
*/
struct timer_list
{
struct list_head list;
long expires;
unsigned long data;
void (*function)(unsigned long);
};
struct ip_nat_hash
{
struct list_head list;
struct ip_conntrack *conntrack;
};
int del_timer(struct timer_list * list);
int add_timer(struct timer_list * list);
#endif