1 //==========================================================================
3 // include/net/if_gif.h
7 //==========================================================================
8 //####BSDCOPYRIGHTBEGIN####
10 // -------------------------------------------
12 // Portions of this software may have been derived from OpenBSD or other sources,
13 // and are covered by the appropriate copyright disclaimers included herein.
15 // -------------------------------------------
17 //####BSDCOPYRIGHTEND####
18 //==========================================================================
19 //#####DESCRIPTIONBEGIN####
22 // Contributors: gthomas
28 //####DESCRIPTIONEND####
30 //==========================================================================
33 /* $OpenBSD: if_gif.h,v 1.1 1999/12/08 06:50:18 itojun Exp $ */
36 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
37 * All rights reserved.
39 * Redistribution and use in source and binary forms, with or without
40 * modification, are permitted provided that the following conditions
42 * 1. Redistributions of source code must retain the above copyright
43 * notice, this list of conditions and the following disclaimer.
44 * 2. Redistributions in binary form must reproduce the above copyright
45 * notice, this list of conditions and the following disclaimer in the
46 * documentation and/or other materials provided with the distribution.
47 * 3. Neither the name of the project nor the names of its contributors
48 * may be used to endorse or promote products derived from this software
49 * without specific prior written permission.
51 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
52 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
55 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
56 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
57 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
58 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
59 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
60 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 #ifndef _NET_IF_GIF_H_
69 #define _NET_IF_GIF_H_
72 #if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__)
73 #if defined(_KERNEL) && !defined(_LKM)
78 #include <netinet/in.h>
79 /* xxx sigh, why route have struct route instead of pointer? */
82 struct ifnet gif_if; /* common area */
83 struct sockaddr *gif_psrc; /* Physical src addr */
84 struct sockaddr *gif_pdst; /* Physical dst addr */
86 struct route gifscr_ro; /* xxx */
88 struct route_in6 gifscr_ro6; /* xxx */
94 #define gif_ro gifsc_gifscr.gifscr_ro
96 #define gif_ro6 gifsc_gifscr.gifscr_ro6
99 #define GIFF_INUSE 0x1 /* gif is in use */
101 #define GIF_MTU (1280) /* Default MTU */
102 #define GIF_MTU_MIN (1280) /* Minimum MTU */
103 #define GIF_MTU_MAX (8192) /* Maximum MTU */
106 extern struct gif_softc *gif;
109 void gif_input __P((struct mbuf *, int, struct ifnet *));
110 int gif_output __P((struct ifnet *, struct mbuf *,
111 struct sockaddr *, struct rtentry *));
112 #if defined(__FreeBSD__) && __FreeBSD__ < 3
113 int gif_ioctl __P((struct ifnet *, int, caddr_t));
115 int gif_ioctl __P((struct ifnet *, u_long, caddr_t));
118 #endif /* _NET_IF_GIF_H_ */