PageRenderTime 24ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/ppp-2.4.5/pppd/ipv6cp.h

#
C Header | 172 lines | 23 code | 6 blank | 143 comment | 1 complexity | 070cdc61fcfe4ef446d3df7d92cc82f4 MD5 | raw file
Possible License(s): 0BSD, LGPL-3.0
  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. /* Original version, based on RFC2023 :
  37. Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,
  38. Alain.Durand@imag.fr, IMAG,
  39. Jean-Luc.Richier@imag.fr, IMAG-LSR.
  40. Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,
  41. Alain.Durand@imag.fr, IMAG,
  42. Jean-Luc.Richier@imag.fr, IMAG-LSR.
  43. Ce travail a été fait au sein du GIE DYADE (Groupement d'Intér?t
  44. Économique ayant pour membres BULL S.A. et l'INRIA).
  45. Ce logiciel informatique est disponible aux conditions
  46. usuelles dans la recherche, c'est-?-dire qu'il peut
  47. ?tre utilisé, copié, modifié, distribué ? l'unique
  48. condition que ce texte soit conservé afin que
  49. l'origine de ce logiciel soit reconnue.
  50. Le nom de l'Institut National de Recherche en Informatique
  51. et en Automatique (INRIA), de l'IMAG, ou d'une personne morale
  52. ou physique ayant participé ? l'élaboration de ce logiciel ne peut
  53. ?tre utilisé sans son accord préalable explicite.
  54. Ce logiciel est fourni tel quel sans aucune garantie,
  55. support ou responsabilité d'aucune sorte.
  56. Ce logiciel est dérivé de sources d'origine
  57. "University of California at Berkeley" et
  58. "Digital Equipment Corporation" couvertes par des copyrights.
  59. L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG)
  60. est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National
  61. Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant
  62. sept laboratoires dont le laboratoire Logiciels, Syst?mes, Réseaux (LSR).
  63. This work has been done in the context of GIE DYADE (joint R & D venture
  64. between BULL S.A. and INRIA).
  65. This software is available with usual "research" terms
  66. with the aim of retain credits of the software.
  67. Permission to use, copy, modify and distribute this software for any
  68. purpose and without fee is hereby granted, provided that the above
  69. copyright notice and this permission notice appear in all copies,
  70. and the name of INRIA, IMAG, or any contributor not be used in advertising
  71. or publicity pertaining to this material without the prior explicit
  72. permission. The software is provided "as is" without any
  73. warranties, support or liabilities of any kind.
  74. This software is derived from source code from
  75. "University of California at Berkeley" and
  76. "Digital Equipment Corporation" protected by copyrights.
  77. Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)
  78. is a federation of seven research units funded by the CNRS, National
  79. Polytechnic Institute of Grenoble and University Joseph Fourier.
  80. The research unit in Software, Systems, Networks (LSR) is member of IMAG.
  81. */
  82. /*
  83. * Derived from :
  84. *
  85. *
  86. * ipcp.h - IP Control Protocol definitions.
  87. *
  88. * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved.
  89. *
  90. * Redistribution and use in source and binary forms, with or without
  91. * modification, are permitted provided that the following conditions
  92. * are met:
  93. *
  94. * 1. Redistributions of source code must retain the above copyright
  95. * notice, this list of conditions and the following disclaimer.
  96. *
  97. * 2. Redistributions in binary form must reproduce the above copyright
  98. * notice, this list of conditions and the following disclaimer in
  99. * the documentation and/or other materials provided with the
  100. * distribution.
  101. *
  102. * 3. The name "Carnegie Mellon University" must not be used to
  103. * endorse or promote products derived from this software without
  104. * prior written permission. For permission or any legal
  105. * details, please contact
  106. * Office of Technology Transfer
  107. * Carnegie Mellon University
  108. * 5000 Forbes Avenue
  109. * Pittsburgh, PA 15213-3890
  110. * (412) 268-4387, fax: (412) 268-7395
  111. * tech-transfer@andrew.cmu.edu
  112. *
  113. * 4. Redistributions of any form whatsoever must retain the following
  114. * acknowledgment:
  115. * "This product includes software developed by Computing Services
  116. * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
  117. *
  118. * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
  119. * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  120. * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
  121. * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  122. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  123. * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  124. * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  125. *
  126. * $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $
  127. */
  128. /*
  129. * Options.
  130. */
  131. #define CI_IFACEID 1 /* Interface Identifier */
  132. #define CI_COMPRESSTYPE 2 /* Compression Type */
  133. /* No compression types yet defined.
  134. *#define IPV6CP_COMP 0x004f
  135. */
  136. typedef struct ipv6cp_options {
  137. int neg_ifaceid; /* Negotiate interface identifier? */
  138. int req_ifaceid; /* Ask peer to send interface identifier? */
  139. int accept_local; /* accept peer's value for our iface id? */
  140. int accept_remote; /* accept peer's value for his iface id? */
  141. int opt_local; /* ourtoken set by option */
  142. int opt_remote; /* histoken set by option */
  143. int use_ip; /* use IP as interface identifier */
  144. #if defined(SOL2) || defined(__linux__)
  145. int use_persistent; /* use uniquely persistent value for address */
  146. #endif /* defined(SOL2) */
  147. int neg_vj; /* Van Jacobson Compression? */
  148. u_short vj_protocol; /* protocol value to use in VJ option */
  149. eui64_t ourid, hisid; /* Interface identifiers */
  150. } ipv6cp_options;
  151. extern fsm ipv6cp_fsm[];
  152. extern ipv6cp_options ipv6cp_wantoptions[];
  153. extern ipv6cp_options ipv6cp_gotoptions[];
  154. extern ipv6cp_options ipv6cp_allowoptions[];
  155. extern ipv6cp_options ipv6cp_hisoptions[];
  156. extern struct protent ipv6cp_protent;