PageRenderTime 57ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/external/mbed-os/features/FEATURE_LWIP/lwip-interface/lwip/src/include/netif/ppp/ipv6cp.h

https://github.com/adamgreen/gcc4mbed
C Header | 183 lines | 30 code | 10 blank | 143 comment | 1 complexity | 1ecb3275d6e0da0e6f49236f20029634 MD5 | raw file
  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. #include "netif/ppp/ppp_opts.h"
  129. #if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
  130. #ifndef IPV6CP_H
  131. #define IPV6CP_H
  132. #include "eui64.h"
  133. /*
  134. * Options.
  135. */
  136. #define CI_IFACEID 1 /* Interface Identifier */
  137. #ifdef IPV6CP_COMP
  138. #define CI_COMPRESSTYPE 2 /* Compression Type */
  139. #endif /* IPV6CP_COMP */
  140. /* No compression types yet defined.
  141. *#define IPV6CP_COMP 0x004f
  142. */
  143. typedef struct ipv6cp_options {
  144. unsigned int neg_ifaceid :1; /* Negotiate interface identifier? */
  145. unsigned int req_ifaceid :1; /* Ask peer to send interface identifier? */
  146. unsigned int accept_local :1; /* accept peer's value for iface id? */
  147. unsigned int opt_local :1; /* ourtoken set by option */
  148. unsigned int opt_remote :1; /* histoken set by option */
  149. unsigned int use_ip :1; /* use IP as interface identifier */
  150. #if 0
  151. unsigned int use_persistent :1; /* use uniquely persistent value for address */
  152. #endif
  153. #ifdef IPV6CP_COMP
  154. unsigned int neg_vj :1; /* Van Jacobson Compression? */
  155. #endif /* IPV6CP_COMP */
  156. #ifdef IPV6CP_COMP
  157. u_short vj_protocol; /* protocol value to use in VJ option */
  158. #endif /* IPV6CP_COMP */
  159. eui64_t ourid, hisid; /* Interface identifiers */
  160. } ipv6cp_options;
  161. extern const struct protent ipv6cp_protent;
  162. #endif /* IPV6CP_H */
  163. #endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */