xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/ipv6cp.h (revision aedf2b3bb56b025fcaf87b49ec6c8aeea07f16d7)
1 /*
2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  *
5     ipv6cp.h - PPP IPV6 Control Protocol.
6     Copyright (C) 1999  Tommi Komulainen <Tommi.Komulainen@iki.fi>
7 
8     Redistribution and use in source and binary forms are permitted
9     provided that the above copyright notice and this paragraph are
10     duplicated in all such forms.  The name of the author may not be
11     used to endorse or promote products derived from this software
12     without specific prior written permission.
13     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15     WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 */
17 
18 /*  Original version, based on RFC2023 :
19 
20     Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,
21     Alain.Durand@imag.fr, IMAG,
22     Jean-Luc.Richier@imag.fr, IMAG-LSR.
23 
24     Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,
25     Alain.Durand@imag.fr, IMAG,
26     Jean-Luc.Richier@imag.fr, IMAG-LSR.
27 
28     Ce travail a �t� fait au sein du GIE DYADE (Groupement d'Int�r�t
29     �conomique ayant pour membres BULL S.A. et l'INRIA).
30 
31     Ce logiciel informatique est disponible aux conditions
32     usuelles dans la recherche, c'est-�-dire qu'il peut
33     �tre utilis�, copi�, modifi�, distribu� � l'unique
34     condition que ce texte soit conserv� afin que
35     l'origine de ce logiciel soit reconnue.
36 
37     Le nom de l'Institut National de Recherche en Informatique
38     et en Automatique (INRIA), de l'IMAG, ou d'une personne morale
39     ou physique ayant particip� � l'�laboration de ce logiciel ne peut
40     �tre utilis� sans son accord pr�alable explicite.
41 
42     Ce logiciel est fourni tel quel sans aucune garantie,
43     support ou responsabilit� d'aucune sorte.
44     Ce logiciel est d�riv� de sources d'origine
45     "University of California at Berkeley" et
46     "Digital Equipment Corporation" couvertes par des copyrights.
47 
48     L'Institut d'Informatique et de Math�matiques Appliqu�es de Grenoble (IMAG)
49     est une f�d�ration d'unit�s mixtes de recherche du CNRS, de l'Institut National
50     Polytechnique de Grenoble et de l'Universit� Joseph Fourier regroupant
51     sept laboratoires dont le laboratoire Logiciels, Syst�mes, R�seaux (LSR).
52 
53     This work has been done in the context of GIE DYADE (joint R & D venture
54     between BULL S.A. and INRIA).
55 
56     This software is available with usual "research" terms
57     with the aim of retain credits of the software.
58     Permission to use, copy, modify and distribute this software for any
59     purpose and without fee is hereby granted, provided that the above
60     copyright notice and this permission notice appear in all copies,
61     and the name of INRIA, IMAG, or any contributor not be used in advertising
62     or publicity pertaining to this material without the prior explicit
63     permission. The software is provided "as is" without any
64     warranties, support or liabilities of any kind.
65     This software is derived from source code from
66     "University of California at Berkeley" and
67     "Digital Equipment Corporation" protected by copyrights.
68 
69     Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)
70     is a federation of seven research units funded by the CNRS, National
71     Polytechnic Institute of Grenoble and University Joseph Fourier.
72     The research unit in Software, Systems, Networks (LSR) is member of IMAG.
73 */
74 
75 /*
76  * Derived from :
77  *
78  *
79  * ipcp.h - IP Control Protocol definitions.
80  *
81  * Copyright (c) 1989 Carnegie Mellon University.
82  * All rights reserved.
83  *
84  * Redistribution and use in source and binary forms are permitted
85  * provided that the above copyright notice and this paragraph are
86  * duplicated in all such forms and that any documentation,
87  * advertising materials, and other materials related to such
88  * distribution and use acknowledge that the software was developed
89  * by Carnegie Mellon University.  The name of the
90  * University may not be used to endorse or promote products derived
91  * from this software without specific prior written permission.
92  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
93  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
94  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
95  *
96  * $Id: ipv6cp.h,v 1.3 1999/09/30 19:57:45 masputra Exp $
97  */
98 
99 #include <netinet/ip6.h>
100 
101 /*
102  * Options.
103  */
104 #define CI_IFACEID	1	/* Interface Identifier */
105 #define CI_COMPRESSTYPE	2	/* Compression Type     */
106 
107 /*
108  *#define IPV6CP_COMP	0x0061
109  */
110 typedef struct ipv6cp_options {
111     bool neg_ifaceid;		/* Negotiate interface identifier? */
112     bool req_ifaceid;		/* Ask peer to send interface identifier? */
113     bool accept_local;		/* accept peer's value for iface id? */
114     bool opt_local;		/* ourtoken set by option */
115     bool opt_remote;		/* histoken set by option */
116     bool use_ip;		/* use IP as interface identifier */
117 #if defined(SOL2)
118     bool use_persistent;	/* use uniquely persistent value for address */
119 #endif /* defined(SOL2) */
120     bool neg_vj;		/* Van Jacobson Compression? */
121     u_short vj_protocol;	/* protocol value to use in VJ option */
122     eui64_t ourid, hisid;	/* Interface identifiers */
123 } ipv6cp_options;
124 
125 extern fsm ipv6cp_fsm[];
126 extern ipv6cp_options ipv6cp_wantoptions[];
127 extern ipv6cp_options ipv6cp_gotoptions[];
128 extern ipv6cp_options ipv6cp_allowoptions[];
129 extern ipv6cp_options ipv6cp_hisoptions[];
130 
131 extern struct protent ipv6cp_protent;
132 
133 #define IP6_HDRLEN	(sizeof (struct ip6_hdr))	/* bytes */
134