summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_nat.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_nat.h')
-rw-r--r--sys/netinet/ip_nat.h43
1 files changed, 37 insertions, 6 deletions
diff --git a/sys/netinet/ip_nat.h b/sys/netinet/ip_nat.h
index d64183a..6dcd28b 100644
--- a/sys/netinet/ip_nat.h
+++ b/sys/netinet/ip_nat.h
@@ -6,7 +6,7 @@
* to the original author and the contributors.
*
* @(#)ip_nat.h 1.5 2/4/96
- * $Id: ip_nat.h,v 2.0.1.7 1997/01/30 12:39:41 darrenr Exp $
+ * $Id: ip_nat.h,v 1.1.1.2 1997/04/03 10:11:19 darrenr Exp $
*/
#ifndef __IP_NAT_H_
@@ -40,7 +40,8 @@
#define NAT_SIZE 367
typedef struct nat {
- int nat_age;
+ u_long nat_age;
+ int nat_flags;
u_long nat_sumd;
u_long nat_ipsumd;
struct in_addr nat_inip;
@@ -101,6 +102,8 @@ typedef struct natstat {
u_long ns_added;
u_long ns_expire;
u_long ns_inuse;
+ u_long ns_logged;
+ u_long ns_logfail;
nat_t **ns_table[2];
ipnat_t *ns_list;
} natstat_t;
@@ -110,9 +113,37 @@ typedef struct natstat {
#define IPN_UDP 2
#define IPN_TCPUDP 3
+
+typedef struct natlog {
+ struct timeval nl_tv;
+ struct in_addr nl_origip;
+ struct in_addr nl_outip;
+ struct in_addr nl_inip;
+ u_short nl_origport;
+ u_short nl_outport;
+ u_short nl_inport;
+ u_short nl_type;
+ int nl_rule;
+} natlog_t;
+
+
+#define NL_NEWMAP NAT_MAP
+#define NL_NEWRDR NAT_REDIRECT
+#define NL_EXPIRE 0xffff
+
+
extern nat_t *nat_table[2][NAT_SIZE];
-extern int nat_ioctl();
-extern nat_t *nat_outlookup(), *nat_inlookup(), *nat_lookupredir();
-extern int ip_natout(), ip_natin();
-extern void ip_natunload(), ip_natexpire();
+extern int nat_ioctl __P((caddr_t, int, int));
+extern nat_t *nat_outlookup __P((int, struct in_addr, u_short,
+ struct in_addr, u_short));
+extern nat_t *nat_inlookup __P((int, struct in_addr, u_short,
+ struct in_addr, u_short));
+extern nat_t *nat_lookupredir __P((natlookup_t *));
+extern nat_t *nat_lookupmapip __P((int, struct in_addr, u_short,
+ struct in_addr, u_short));
+
+extern int ip_natout __P((ip_t *, int, fr_info_t *));
+extern int ip_natin __P((ip_t *, int, fr_info_t *));
+extern void ip_natunload __P((void)), ip_natexpire __P((void));
+extern void nat_log __P((struct nat *, u_short));
#endif /* __IP_NAT_H__ */
OpenPOWER on IntegriCloud