ת»»Ϊgb2312±àÂë
This commit is contained in:
@@ -1,132 +0,0 @@
|
||||
/**
|
||||
* @defgroup lwip lwIP
|
||||
*
|
||||
* @defgroup infrastructure Infrastructure
|
||||
*
|
||||
* @defgroup callbackstyle_api Callback-style APIs
|
||||
* Non thread-safe APIs, callback style for maximum performance and minimum
|
||||
* memory footprint.
|
||||
*
|
||||
* @defgroup sequential_api Sequential-style APIs
|
||||
* Sequential-style APIs, blocking functions. More overhead, but can be called
|
||||
* from any thread except TCPIP thread.
|
||||
*
|
||||
* @defgroup addons Addons
|
||||
*
|
||||
* @defgroup apps Applications
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mainpage Overview
|
||||
* @verbinclude "README"
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page upgrading Upgrading
|
||||
* @verbinclude "UPGRADING"
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page changelog Changelog
|
||||
* @verbinclude "CHANGELOG"
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page contrib How to contribute to lwIP
|
||||
* @verbinclude "contrib.txt"
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page pitfalls Common pitfalls
|
||||
*
|
||||
* Multiple Execution Contexts in lwIP code
|
||||
* ========================================
|
||||
*
|
||||
* The most common source of lwIP problems is to have multiple execution contexts
|
||||
* inside the lwIP code.
|
||||
*
|
||||
* lwIP can be used in two basic modes: @ref lwip_nosys (no OS/RTOS
|
||||
* running on target system) or @ref lwip_os (there is an OS running
|
||||
* on the target system).
|
||||
*
|
||||
* Mainloop Mode
|
||||
* -------------
|
||||
* In mainloop mode, only @ref callbackstyle_api can be used.
|
||||
* The user has two possibilities to ensure there is only one
|
||||
* exection context at a time in lwIP:
|
||||
*
|
||||
* 1) Deliver RX ethernet packets directly in interrupt context to lwIP
|
||||
* by calling netif->input directly in interrupt. This implies all lwIP
|
||||
* callback functions are called in IRQ context, which may cause further
|
||||
* problems in application code: IRQ is blocked for a long time, multiple
|
||||
* execution contexts in application code etc. When the application wants
|
||||
* to call lwIP, it only needs to disable interrupts during the call.
|
||||
* If timers are involved, even more locking code is needed to lock out
|
||||
* timer IRQ and ethernet IRQ from each other, assuming these may be nested.
|
||||
*
|
||||
* 2) Run lwIP in a mainloop. There is example code here: @ref lwip_nosys.
|
||||
* lwIP is _ONLY_ called from mainloop callstacks here. The ethernet IRQ
|
||||
* has to put received telegrams into a queue which is polled in the
|
||||
* mainloop. Ensure lwIP is _NEVER_ called from an interrupt, e.g.
|
||||
* some SPI IRQ wants to forward data to udp_send() or tcp_write()!
|
||||
*
|
||||
* OS Mode
|
||||
* -------
|
||||
* In OS mode, @ref callbackstyle_api AND @ref sequential_api can be used.
|
||||
* @ref sequential_api are designed to be called from threads other than
|
||||
* the TCPIP thread, so there is nothing to consider here.
|
||||
* But @ref callbackstyle_api functions must _ONLY_ be called from
|
||||
* TCPIP thread. It is a common error to call these from other threads
|
||||
* or from IRQ contexts. Ethernet RX needs to deliver incoming packets
|
||||
* in the correct way by sending a message to TCPIP thread, this is
|
||||
* implemented in tcpip_input().
|
||||
* Again, ensure lwIP is _NEVER_ called from an interrupt, e.g.
|
||||
* some SPI IRQ wants to forward data to udp_send() or tcp_write()!
|
||||
*
|
||||
* 1) tcpip_callback() can be used get called back from TCPIP thread,
|
||||
* it is safe to call any @ref callbackstyle_api from there.
|
||||
*
|
||||
* 2) Use @ref LWIP_TCPIP_CORE_LOCKING. All @ref callbackstyle_api
|
||||
* functions can be called when lwIP core lock is aquired, see
|
||||
* @ref LOCK_TCPIP_CORE() and @ref UNLOCK_TCPIP_CORE().
|
||||
* These macros cannot be used in an interrupt context!
|
||||
* Note the OS must correctly handle priority inversion for this.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page bugs Reporting bugs
|
||||
* Please report bugs in the lwIP bug tracker at savannah.\n
|
||||
* BEFORE submitting, please check if the bug has already been reported!\n
|
||||
* https://savannah.nongnu.org/bugs/?group=lwip
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lwip_nosys Mainloop mode ("NO_SYS")
|
||||
* @ingroup lwip
|
||||
* Use this mode if you do not run an OS on your system. \#define NO_SYS to 1.
|
||||
* Feed incoming packets to netif->input(pbuf, netif) function from mainloop,
|
||||
* *not* *from* *interrupt* *context*. You can allocate a @ref pbuf in interrupt
|
||||
* context and put them into a queue which is processed from mainloop.\n
|
||||
* Call sys_check_timeouts() periodically in the mainloop.\n
|
||||
* Porting: implement all functions in @ref sys_time, @ref sys_prot and
|
||||
* @ref compiler_abstraction.\n
|
||||
* You can only use @ref callbackstyle_api in this mode.\n
|
||||
* Sample code:\n
|
||||
* @include NO_SYS_SampleCode.c
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lwip_os OS mode (TCPIP thread)
|
||||
* @ingroup lwip
|
||||
* Use this mode if you run an OS on your system. It is recommended to
|
||||
* use an RTOS that correctly handles priority inversion and
|
||||
* to use @ref LWIP_TCPIP_CORE_LOCKING.\n
|
||||
* Porting: implement all functions in @ref sys_layer.\n
|
||||
* You can use @ref callbackstyle_api together with @ref tcpip_callback,
|
||||
* and all @ref sequential_api.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @page raw_api lwIP API
|
||||
* @verbinclude "rawapi.txt"
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2009 Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -31,7 +31,7 @@
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Author: Frédéric Bernon, Simon Goldschmidt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2009 Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -31,7 +31,7 @@
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Author: Frédéric Bernon, Simon Goldschmidt
|
||||
*
|
||||
*/
|
||||
#ifndef LWIP_HDR_APPS_SNTP_H
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2009 Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -31,7 +31,7 @@
|
||||
*
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
* Author: Fr茅d茅ric Bernon, Simon Goldschmidt
|
||||
* Author: Frédéric Bernon, Simon Goldschmidt
|
||||
*
|
||||
*/
|
||||
#ifndef LWIP_HDR_APPS_SNTP_OPTS_H
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
* ipv6cp.h - PPP IPV6 Control Protocol.
|
||||
*
|
||||
* Copyright (c) 1999 Tommi Komulainen. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The name(s) of the authors of this software must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission.
|
||||
*
|
||||
* 4. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by Tommi Komulainen
|
||||
* <Tommi.Komulainen@iki.fi>".
|
||||
*
|
||||
* THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
|
||||
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
|
||||
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Original version, based on RFC2023 :
|
||||
|
||||
Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,
|
||||
Alain.Durand@imag.fr, IMAG,
|
||||
Jean-Luc.Richier@imag.fr, IMAG-LSR.
|
||||
|
||||
Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE,
|
||||
Alain.Durand@imag.fr, IMAG,
|
||||
Jean-Luc.Richier@imag.fr, IMAG-LSR.
|
||||
|
||||
Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt
|
||||
Économique ayant pour membres BULL S.A. et l'INRIA).
|
||||
|
||||
Ce logiciel informatique est disponible aux conditions
|
||||
usuelles dans la recherche, c'est-à-dire qu'il peut
|
||||
être utilisé, copié, modifié, distribué à l'unique
|
||||
condition que ce texte soit conservé afin que
|
||||
l'origine de ce logiciel soit reconnue.
|
||||
|
||||
Le nom de l'Institut National de Recherche en Informatique
|
||||
et en Automatique (INRIA), de l'IMAG, ou d'une personne morale
|
||||
ou physique ayant participé à l'élaboration de ce logiciel ne peut
|
||||
être utilisé sans son accord préalable explicite.
|
||||
|
||||
Ce logiciel est fourni tel quel sans aucune garantie,
|
||||
support ou responsabilité d'aucune sorte.
|
||||
Ce logiciel est dérivé de sources d'origine
|
||||
"University of California at Berkeley" et
|
||||
"Digital Equipment Corporation" couvertes par des copyrights.
|
||||
|
||||
L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG)
|
||||
est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National
|
||||
Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant
|
||||
sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR).
|
||||
|
||||
This work has been done in the context of GIE DYADE (joint R & D venture
|
||||
between BULL S.A. and INRIA).
|
||||
|
||||
This software is available with usual "research" terms
|
||||
with the aim of retain credits of the software.
|
||||
Permission to use, copy, modify and distribute this software for any
|
||||
purpose and without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies,
|
||||
and the name of INRIA, IMAG, or any contributor not be used in advertising
|
||||
or publicity pertaining to this material without the prior explicit
|
||||
permission. The software is provided "as is" without any
|
||||
warranties, support or liabilities of any kind.
|
||||
This software is derived from source code from
|
||||
"University of California at Berkeley" and
|
||||
"Digital Equipment Corporation" protected by copyrights.
|
||||
|
||||
Grenoble's Institute of Computer Science and Applied Mathematics (IMAG)
|
||||
is a federation of seven research units funded by the CNRS, National
|
||||
Polytechnic Institute of Grenoble and University Joseph Fourier.
|
||||
The research unit in Software, Systems, Networks (LSR) is member of IMAG.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Derived from :
|
||||
*
|
||||
*
|
||||
* ipcp.h - IP Control Protocol definitions.
|
||||
*
|
||||
* Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The name "Carnegie Mellon University" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For permission or any legal
|
||||
* details, please contact
|
||||
* Office of Technology Transfer
|
||||
* Carnegie Mellon University
|
||||
* 5000 Forbes Avenue
|
||||
* Pittsburgh, PA 15213-3890
|
||||
* (412) 268-4387, fax: (412) 268-7395
|
||||
* tech-transfer@andrew.cmu.edu
|
||||
*
|
||||
* 4. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by Computing Services
|
||||
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
|
||||
*
|
||||
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $
|
||||
*/
|
||||
|
||||
#include "netif/ppp/ppp_opts.h"
|
||||
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#ifndef IPV6CP_H
|
||||
#define IPV6CP_H
|
||||
|
||||
#include "eui64.h"
|
||||
|
||||
/*
|
||||
* Options.
|
||||
*/
|
||||
#define CI_IFACEID 1 /* Interface Identifier */
|
||||
#ifdef IPV6CP_COMP
|
||||
#define CI_COMPRESSTYPE 2 /* Compression Type */
|
||||
#endif /* IPV6CP_COMP */
|
||||
|
||||
/* No compression types yet defined.
|
||||
*#define IPV6CP_COMP 0x004f
|
||||
*/
|
||||
typedef struct ipv6cp_options {
|
||||
unsigned int neg_ifaceid :1; /* Negotiate interface identifier? */
|
||||
unsigned int req_ifaceid :1; /* Ask peer to send interface identifier? */
|
||||
unsigned int accept_local :1; /* accept peer's value for iface id? */
|
||||
unsigned int opt_local :1; /* ourtoken set by option */
|
||||
unsigned int opt_remote :1; /* histoken set by option */
|
||||
unsigned int use_ip :1; /* use IP as interface identifier */
|
||||
#if 0
|
||||
unsigned int use_persistent :1; /* use uniquely persistent value for address */
|
||||
#endif
|
||||
#ifdef IPV6CP_COMP
|
||||
unsigned int neg_vj :1; /* Van Jacobson Compression? */
|
||||
#endif /* IPV6CP_COMP */
|
||||
|
||||
#ifdef IPV6CP_COMP
|
||||
u_short vj_protocol; /* protocol value to use in VJ option */
|
||||
#endif /* IPV6CP_COMP */
|
||||
eui64_t ourid, hisid; /* Interface identifiers */
|
||||
} ipv6cp_options;
|
||||
|
||||
extern const struct protent ipv6cp_protent;
|
||||
|
||||
#endif /* IPV6CP_H */
|
||||
#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user