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