ip_nat.h (63523) | ip_nat.h (67614) |
---|---|
1/* 2 * Copyright (C) 1995-2000 by Darren Reed. 3 * 4 * Redistribution and use in source and binary forms are permitted 5 * provided that this notice is preserved and due credit is given 6 * to the original author and the contributors. 7 * 8 * @(#)ip_nat.h 1.5 2/4/96 9 * $Id: ip_nat.h,v 2.17.2.6 2000/07/15 14:50:06 darrenr Exp $ | 1/* 2 * Copyright (C) 1995-2000 by Darren Reed. 3 * 4 * Redistribution and use in source and binary forms are permitted 5 * provided that this notice is preserved and due credit is given 6 * to the original author and the contributors. 7 * 8 * @(#)ip_nat.h 1.5 2/4/96 9 * $Id: ip_nat.h,v 2.17.2.6 2000/07/15 14:50:06 darrenr Exp $ |
10 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_nat.h 63523 2000-07-19 14:02:09Z darrenr $ | 10 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_nat.h 67614 2000-10-26 12:33:42Z darrenr $ |
11 */ 12 13#ifndef __IP_NAT_H__ 14#define __IP_NAT_H__ 15 16#ifndef SOLARIS 17#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) 18#endif --- 58 unchanged lines hidden (view full) --- 77 u_short nat_outport; 78 u_short nat_use; 79 u_char nat_tcpstate[2]; 80 u_char nat_p; /* protocol for NAT */ 81 struct ipnat *nat_ptr; /* pointer back to the rule */ 82 struct hostmap *nat_hm; 83 struct nat *nat_next; 84 struct nat *nat_hnext[2]; | 11 */ 12 13#ifndef __IP_NAT_H__ 14#define __IP_NAT_H__ 15 16#ifndef SOLARIS 17#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) 18#endif --- 58 unchanged lines hidden (view full) --- 77 u_short nat_outport; 78 u_short nat_use; 79 u_char nat_tcpstate[2]; 80 u_char nat_p; /* protocol for NAT */ 81 struct ipnat *nat_ptr; /* pointer back to the rule */ 82 struct hostmap *nat_hm; 83 struct nat *nat_next; 84 struct nat *nat_hnext[2]; |
85 struct nat **nat_hstart[2]; | 85 struct nat **nat_phnext[2]; |
86 void *nat_ifp; 87 int nat_dir; 88 char nat_ifname[IFNAMSIZ]; 89#if SOLARIS || defined(_sgi) 90 kmutex_t nat_lock; 91#endif 92} nat_t; 93 --- 43 unchanged lines hidden (view full) --- 137 138#define NAT_OUTBOUND 0 139#define NAT_INBOUND 1 140 141#define NAT_MAP 0x01 142#define NAT_REDIRECT 0x02 143#define NAT_BIMAP (NAT_MAP|NAT_REDIRECT) 144#define NAT_MAPBLK 0x04 | 86 void *nat_ifp; 87 int nat_dir; 88 char nat_ifname[IFNAMSIZ]; 89#if SOLARIS || defined(_sgi) 90 kmutex_t nat_lock; 91#endif 92} nat_t; 93 --- 43 unchanged lines hidden (view full) --- 137 138#define NAT_OUTBOUND 0 139#define NAT_INBOUND 1 140 141#define NAT_MAP 0x01 142#define NAT_REDIRECT 0x02 143#define NAT_BIMAP (NAT_MAP|NAT_REDIRECT) 144#define NAT_MAPBLK 0x04 |
145/* 0x100 reserved for FI_W_SPORT */ 146/* 0x200 reserved for FI_W_DPORT */ 147/* 0x400 reserved for FI_W_SADDR */ 148/* 0x800 reserved for FI_W_DADDR */ 149/* 0x1000 reserved for FI_W_NEWFR */ |
|
145 146#define MAPBLK_MINPORT 1024 /* don't use reserved ports for src port */ 147#define USABLE_PORTS (65536 - MAPBLK_MINPORT) 148 149#define IPN_CMPSIZ (sizeof(ipnat_t) - offsetof(ipnat_t, in_flags)) 150 151typedef struct natlookup { 152 struct in_addr nl_inip; --- 136 unchanged lines hidden (view full) --- 289extern nat_t *nat_icmplookup __P((ip_t *, fr_info_t *, int)); 290extern nat_t *nat_icmp __P((ip_t *, fr_info_t *, u_int *, int)); 291extern void nat_insert __P((nat_t *)); 292 293extern int ip_natout __P((ip_t *, fr_info_t *)); 294extern int ip_natin __P((ip_t *, fr_info_t *)); 295extern void ip_natunload __P((void)), ip_natexpire __P((void)); 296extern void nat_log __P((struct nat *, u_int)); | 150 151#define MAPBLK_MINPORT 1024 /* don't use reserved ports for src port */ 152#define USABLE_PORTS (65536 - MAPBLK_MINPORT) 153 154#define IPN_CMPSIZ (sizeof(ipnat_t) - offsetof(ipnat_t, in_flags)) 155 156typedef struct natlookup { 157 struct in_addr nl_inip; --- 136 unchanged lines hidden (view full) --- 294extern nat_t *nat_icmplookup __P((ip_t *, fr_info_t *, int)); 295extern nat_t *nat_icmp __P((ip_t *, fr_info_t *, u_int *, int)); 296extern void nat_insert __P((nat_t *)); 297 298extern int ip_natout __P((ip_t *, fr_info_t *)); 299extern int ip_natin __P((ip_t *, fr_info_t *)); 300extern void ip_natunload __P((void)), ip_natexpire __P((void)); 301extern void nat_log __P((struct nat *, u_int)); |
297extern void fix_incksum __P((u_short *, u_32_t, int)); 298extern void fix_outcksum __P((u_short *, u_32_t, int)); | 302extern void fix_incksum __P((u_short *, u_32_t)); 303extern void fix_outcksum __P((u_short *, u_32_t)); 304extern void fix_datacksum __P((u_short *, u_32_t)); |
299 300#endif /* __IP_NAT_H__ */ | 305 306#endif /* __IP_NAT_H__ */ |