summaryrefslogtreecommitdiffstats
path: root/include/net/ip_portfw.h
blob: f2b51ea1ca277cda23f1197a0e9426e651d785d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _IP_PORTFW_H
#define  _IP_PORTFW_H

#include <linux/types.h>

#define IP_PORTFW_PORT_MIN 1
#define IP_PORTFW_PORT_MAX 60999

#ifdef __KERNEL__
struct ip_portfw {
	struct 		list_head list;
	__u32           laddr, raddr;
	__u16           lport, rport;
	atomic_t	pref_cnt;	/* pref "counter" down to 0 */
	int 		pref;		/* user set pref */
};
extern int ip_portfw_init(void);

#endif /* __KERNEL__ */

struct ip_portfw_edits {
	__u16           protocol;       /* Which protocol are we talking? */
	__u32           laddr, raddr;   /* Remote address */
	__u16           lport, rport;   /* Local and remote port */
	__u16           dummy;          /* Make up to multiple of 4 */
	int 		pref;		/* Preference value */
};

#endif