]> git.saurik.com Git - apple/xnu.git/blame - bsd/netinet6/natpt_var.h
xnu-123.5.tar.gz
[apple/xnu.git] / bsd / netinet6 / natpt_var.h
CommitLineData
1c79356b
A
1/* $KAME: natpt_var.h,v 1.6 2000/03/25 07:23:57 sumikawa Exp $ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32
33extern int natpt_initialized;
34extern int ip6_protocol_tr;
35extern u_int natpt_debug;
36extern u_int natpt_dump;
37
38extern struct ifnet *natpt_ip6src;
39
40/* natpt_log.c */
41void natpt_logMsg __P((int, void *, size_t));
42void natpt_logMBuf __P((int, struct mbuf *, char *));
43void natpt_logIp4 __P((int, struct ip *));
44void natpt_logIp6 __P((int, struct ip6_hdr *));
45int natpt_log __P((int, int, void *, size_t));
46int natpt_logIN6addr __P((int, char *, struct in6_addr *));
47
48void natpt_debugProbe __P((void));
49void natpt_assert __P((const char *, int, const char *));
50void natpt_initialize __P((void));
51
52
53/* natpt_rule.c */
54struct _cSlot *lookingForIncomingV4Rule __P((struct _cv *));
55struct _cSlot *lookingForOutgoingV4Rule __P((struct _cv *));
56struct _cSlot *lookingForIncomingV6Rule __P((struct _cv *));
57struct _cSlot *lookingForOutgoingV6Rule __P((struct _cv *));
58int _natptEnableTrans __P((caddr_t));
59int _natptDisableTrans __P((caddr_t));
60int _natptSetRule __P((caddr_t));
61int _natptSetFaithRule __P((caddr_t));
62int _natptFlushRule __P((caddr_t));
63int _natptSetPrefix __P((caddr_t));
64
65int _natptBreak __P((void));
66
67
68struct ifBox *natpt_asIfBox __P((char *));
69struct ifBox *natpt_setIfBox __P((char *));
70
71
72/* natpt_trans.c */
73#ifdef NATPT_NAT
74struct mbuf *translatingIPv4To4 __P((struct _cv *, struct pAddr *));
75struct mbuf *translatingICMPv4To4 __P((struct _cv *, struct pAddr *));
76struct mbuf *translatingTCPv4To4 __P((struct _cv *, struct pAddr *));
77struct mbuf *translatingUDPv4To4 __P((struct _cv *, struct pAddr *));
78#endif
79
80struct mbuf *translatingIPv4To6 __P((struct _cv *, struct pAddr *));
81struct mbuf *translatingICMPv4To6 __P((struct _cv *, struct pAddr *));
82struct mbuf *translatingTCPv4To6 __P((struct _cv *, struct pAddr *));
83struct mbuf *translatingUDPv4To6 __P((struct _cv *, struct pAddr *));
84struct mbuf *translatingTCPUDPv4To6 __P((struct _cv *, struct pAddr *, struct _cv *));
85
86struct mbuf *translatingIPv6To4 __P((struct _cv *, struct pAddr *));
87struct mbuf *translatingICMPv6To4 __P((struct _cv *, struct pAddr *));
88struct mbuf *translatingTCPv6To4 __P((struct _cv *, struct pAddr *));
89struct mbuf *translatingUDPv6To4 __P((struct _cv *, struct pAddr *));
90struct mbuf *translatingTCPUDPv6To4 __P((struct _cv *, struct pAddr *, struct _cv *));
91
92
93/* natpt_tslot.c */
94struct _tSlot *lookingForOutgoingV4Hash __P((struct _cv *));
95struct _tSlot *lookingForIncomingV4Hash __P((struct _cv *));
96struct _tSlot *lookingForOutgoingV6Hash __P((struct _cv *));
97struct _tSlot *lookingForIncomingV6Hash __P((struct _cv *));
98struct _tSlot *internIncomingV4Hash __P((int, struct _cSlot *, struct _cv *));
99struct _tSlot *internOutgoingV4Hash __P((int, struct _cSlot *, struct _cv *));
100struct _tSlot *internIncomingV6Hash __P((int, struct _cSlot *, struct _cv *));
101struct _tSlot *internOutgoingV6Hash __P((int, struct _cSlot *, struct _cv *));
102
103struct _tSlot *checkTraceroute6Return __P((struct _cv *));
104
105void init_hash __P((void));
106void init_tslot __P((void));
107
108
109/* natpt_usrreq.c */
110void natpt_input __P((struct mbuf *, struct sockproto *,
111 struct sockaddr *src, struct sockaddr *dst));
112