xref: /netbsd-src/external/bsd/ppp/dist/pppd/ipv6cp.h (revision f12839c5f795a8def46f685de6698463dbd213a9)
1 /*	$NetBSD: ipv6cp.h,v 1.6 2025/01/08 19:59:39 christos Exp $	*/
2 
3 /*
4  * ipv6cp.h - PPP IPV6 Control Protocol.
5  *
6  * Copyright (c) 1999 Tommi Komulainen.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in
17  *    the documentation and/or other materials provided with the
18  *    distribution.
19  *
20  * 3. The name(s) of the authors of this software must not be used to
21  *    endorse or promote products derived from this software without
22  *    prior written permission.
23  *
24  * 4. Redistributions of any form whatsoever must retain the following
25  *    acknowledgment:
26  *    "This product includes software developed by Tommi Komulainen
27  *     <Tommi.Komulainen@iki.fi>".
28  *
29  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
30  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
31  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
32  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
33  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
34  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
35  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
36  *
37  */
38 
39 #ifndef PPP_IPV6CP_H
40 #define PPP_IPV6CP_H
41 
42 #include "pppdconf.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /*  Original version, based on RFC2023 :
49 
50     Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,
51     Alain.Durand@imag.fr, IMAG,
52     Jean-Luc.Richier@imag.fr, IMAG-LSR.
53 
54     Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,
55     Alain.Durand@imag.fr, IMAG,
56     Jean-Luc.Richier@imag.fr, IMAG-LSR.
57 
58     Ce travail a �t� fait au sein du GIE DYADE (Groupement d'Int�r�t
59     �conomique ayant pour membres BULL S.A. et l'INRIA).
60 
61     Ce logiciel informatique est disponible aux conditions
62     usuelles dans la recherche, c'est-�-dire qu'il peut
63     �tre utilis�, copi�, modifi�, distribu� � l'unique
64     condition que ce texte soit conserv� afin que
65     l'origine de ce logiciel soit reconnue.
66 
67     Le nom de l'Institut National de Recherche en Informatique
68     et en Automatique (INRIA), de l'IMAG, ou d'une personne morale
69     ou physique ayant particip� � l'�laboration de ce logiciel ne peut
70     �tre utilis� sans son accord pr�alable explicite.
71 
72     Ce logiciel est fourni tel quel sans aucune garantie,
73     support ou responsabilit� d'aucune sorte.
74     Ce logiciel est d�riv� de sources d'origine
75     "University of California at Berkeley" et
76     "Digital Equipment Corporation" couvertes par des copyrights.
77 
78     L'Institut d'Informatique et de Math�matiques Appliqu�es de Grenoble (IMAG)
79     est une f�d�ration d'unit�s mixtes de recherche du CNRS, de l'Institut National
80     Polytechnique de Grenoble et de l'Universit� Joseph Fourier regroupant
81     sept laboratoires dont le laboratoire Logiciels, Syst�mes, R�seaux (LSR).
82 
83     This work has been done in the context of GIE DYADE (joint R & D venture
84     between BULL S.A. and INRIA).
85 
86     This software is available with usual "research" terms
87     with the aim of retain credits of the software.
88     Permission to use, copy, modify and distribute this software for any
89     purpose and without fee is hereby granted, provided that the above
90     copyright notice and this permission notice appear in all copies,
91     and the name of INRIA, IMAG, or any contributor not be used in advertising
92     or publicity pertaining to this material without the prior explicit
93     permission. The software is provided "as is" without any
94     warranties, support or liabilities of any kind.
95     This software is derived from source code from
96     "University of California at Berkeley" and
97     "Digital Equipment Corporation" protected by copyrights.
98 
99     Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)
100     is a federation of seven research units funded by the CNRS, National
101     Polytechnic Institute of Grenoble and University Joseph Fourier.
102     The research unit in Software, Systems, Networks (LSR) is member of IMAG.
103 */
104 
105 /*
106  * Derived from :
107  *
108  *
109  * ipcp.h - IP Control Protocol definitions.
110  *
111  * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved.
112  *
113  * Redistribution and use in source and binary forms, with or without
114  * modification, are permitted provided that the following conditions
115  * are met:
116  *
117  * 1. Redistributions of source code must retain the above copyright
118  *    notice, this list of conditions and the following disclaimer.
119  *
120  * 2. Redistributions in binary form must reproduce the above copyright
121  *    notice, this list of conditions and the following disclaimer in
122  *    the documentation and/or other materials provided with the
123  *    distribution.
124  *
125  * 3. The name "Carnegie Mellon University" must not be used to
126  *    endorse or promote products derived from this software without
127  *    prior written permission. For permission or any legal
128  *    details, please contact
129  *      Office of Technology Transfer
130  *      Carnegie Mellon University
131  *      5000 Forbes Avenue
132  *      Pittsburgh, PA  15213-3890
133  *      (412) 268-4387, fax: (412) 268-7395
134  *      tech-transfer@andrew.cmu.edu
135  *
136  * 4. Redistributions of any form whatsoever must retain the following
137  *    acknowledgment:
138  *    "This product includes software developed by Computing Services
139  *     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
140  *
141  * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
142  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
143  * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
144  * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
145  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
146  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
147  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
148  */
149 
150 /*
151  * Options.
152  */
153 #define CI_IFACEID	1	/* Interface Identifier */
154 #define CI_COMPRESSTYPE	2	/* Compression Type     */
155 
156 /* No compression types yet defined.
157  *#define IPV6CP_COMP	0x004f
158  */
159 typedef struct ipv6cp_options {
160     int neg_ifaceid;		/* Negotiate interface identifier? */
161     int req_ifaceid;		/* Ask peer to send interface identifier? */
162     int default_route;		/* Assign default route through interface? */
163     int accept_local;		/* accept peer's value for our iface id? */
164     int accept_remote;		/* accept peer's value for his iface id? */
165     int opt_local;		/* ourtoken set by option */
166     int opt_remote;		/* histoken set by option */
167     int use_ip;			/* use IP as interface identifier */
168     int use_persistent;		/* use uniquely persistent value for address */
169     int use_remotenumber;	/* use remote number value for address */
170     int neg_vj;			/* Van Jacobson Compression? */
171     u_short vj_protocol;	/* protocol value to use in VJ option */
172     eui64_t ourid, hisid;	/* Interface identifiers */
173 } ipv6cp_options;
174 
175 extern fsm ipv6cp_fsm[];
176 extern ipv6cp_options ipv6cp_wantoptions[];
177 extern ipv6cp_options ipv6cp_gotoptions[];
178 extern ipv6cp_options ipv6cp_allowoptions[];
179 extern ipv6cp_options ipv6cp_hisoptions[];
180 
181 extern struct protent ipv6cp_protent;
182 
183 /*
184  * Hook for a plugin to know when IPv6 protocol has come up
185  */
186 typedef void (ipv6_up_hook_fn)(void);
187 extern ipv6_up_hook_fn *ipv6_up_hook;
188 
189 /*
190  * Hook for a plugin to know when IPv6 protocol has come down
191  */
192 typedef void (ipv6_down_hook_fn)(void);
193 extern ipv6_down_hook_fn *ipv6_down_hook;
194 
195 #ifdef __cplusplus
196 }
197 #endif
198 
199 #endif
200