ProjetoBB
Dependencies: F7_Ethernet WebSocketClient mbed mcp3008
Fork of Nucleo_F746ZG_Ethernet by
F7_Ethernet/lwip/netif/ppp/magic.c@0:f9b6112278fe, 2016-06-18 (annotated)
- Committer:
- DieterGraef
- Date:
- Sat Jun 18 10:49:12 2016 +0000
- Revision:
- 0:f9b6112278fe
Ethernet for the NUCLEO STM32F746 Board Testprogram uses DHCP and NTP to set the clock
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DieterGraef | 0:f9b6112278fe | 1 | /***************************************************************************** |
DieterGraef | 0:f9b6112278fe | 2 | * magic.c - Network Random Number Generator program file. |
DieterGraef | 0:f9b6112278fe | 3 | * |
DieterGraef | 0:f9b6112278fe | 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. |
DieterGraef | 0:f9b6112278fe | 5 | * portions Copyright (c) 1997 by Global Election Systems Inc. |
DieterGraef | 0:f9b6112278fe | 6 | * |
DieterGraef | 0:f9b6112278fe | 7 | * The authors hereby grant permission to use, copy, modify, distribute, |
DieterGraef | 0:f9b6112278fe | 8 | * and license this software and its documentation for any purpose, provided |
DieterGraef | 0:f9b6112278fe | 9 | * that existing copyright notices are retained in all copies and that this |
DieterGraef | 0:f9b6112278fe | 10 | * notice and the following disclaimer are included verbatim in any |
DieterGraef | 0:f9b6112278fe | 11 | * distributions. No written agreement, license, or royalty fee is required |
DieterGraef | 0:f9b6112278fe | 12 | * for any of the authorized uses. |
DieterGraef | 0:f9b6112278fe | 13 | * |
DieterGraef | 0:f9b6112278fe | 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR |
DieterGraef | 0:f9b6112278fe | 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
DieterGraef | 0:f9b6112278fe | 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
DieterGraef | 0:f9b6112278fe | 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
DieterGraef | 0:f9b6112278fe | 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
DieterGraef | 0:f9b6112278fe | 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
DieterGraef | 0:f9b6112278fe | 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
DieterGraef | 0:f9b6112278fe | 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
DieterGraef | 0:f9b6112278fe | 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
DieterGraef | 0:f9b6112278fe | 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
DieterGraef | 0:f9b6112278fe | 24 | * |
DieterGraef | 0:f9b6112278fe | 25 | ****************************************************************************** |
DieterGraef | 0:f9b6112278fe | 26 | * REVISION HISTORY |
DieterGraef | 0:f9b6112278fe | 27 | * |
DieterGraef | 0:f9b6112278fe | 28 | * 03-01-01 Marc Boucher <marc@mbsi.ca> |
DieterGraef | 0:f9b6112278fe | 29 | * Ported to lwIP. |
DieterGraef | 0:f9b6112278fe | 30 | * 97-12-04 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc. |
DieterGraef | 0:f9b6112278fe | 31 | * Original based on BSD magic.c. |
DieterGraef | 0:f9b6112278fe | 32 | *****************************************************************************/ |
DieterGraef | 0:f9b6112278fe | 33 | /* |
DieterGraef | 0:f9b6112278fe | 34 | * magic.c - PPP Magic Number routines. |
DieterGraef | 0:f9b6112278fe | 35 | * |
DieterGraef | 0:f9b6112278fe | 36 | * Copyright (c) 1989 Carnegie Mellon University. |
DieterGraef | 0:f9b6112278fe | 37 | * All rights reserved. |
DieterGraef | 0:f9b6112278fe | 38 | * |
DieterGraef | 0:f9b6112278fe | 39 | * Redistribution and use in source and binary forms are permitted |
DieterGraef | 0:f9b6112278fe | 40 | * provided that the above copyright notice and this paragraph are |
DieterGraef | 0:f9b6112278fe | 41 | * duplicated in all such forms and that any documentation, |
DieterGraef | 0:f9b6112278fe | 42 | * advertising materials, and other materials related to such |
DieterGraef | 0:f9b6112278fe | 43 | * distribution and use acknowledge that the software was developed |
DieterGraef | 0:f9b6112278fe | 44 | * by Carnegie Mellon University. The name of the |
DieterGraef | 0:f9b6112278fe | 45 | * University may not be used to endorse or promote products derived |
DieterGraef | 0:f9b6112278fe | 46 | * from this software without specific prior written permission. |
DieterGraef | 0:f9b6112278fe | 47 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
DieterGraef | 0:f9b6112278fe | 48 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
DieterGraef | 0:f9b6112278fe | 49 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
DieterGraef | 0:f9b6112278fe | 50 | */ |
DieterGraef | 0:f9b6112278fe | 51 | |
DieterGraef | 0:f9b6112278fe | 52 | #include "lwip/opt.h" |
DieterGraef | 0:f9b6112278fe | 53 | |
DieterGraef | 0:f9b6112278fe | 54 | #if PPP_SUPPORT |
DieterGraef | 0:f9b6112278fe | 55 | |
DieterGraef | 0:f9b6112278fe | 56 | #include "ppp_impl.h" |
DieterGraef | 0:f9b6112278fe | 57 | #include "randm.h" |
DieterGraef | 0:f9b6112278fe | 58 | #include "magic.h" |
DieterGraef | 0:f9b6112278fe | 59 | |
DieterGraef | 0:f9b6112278fe | 60 | |
DieterGraef | 0:f9b6112278fe | 61 | /* |
DieterGraef | 0:f9b6112278fe | 62 | * magicInit - Initialize the magic number generator. |
DieterGraef | 0:f9b6112278fe | 63 | * |
DieterGraef | 0:f9b6112278fe | 64 | * Since we use another random number generator that has its own |
DieterGraef | 0:f9b6112278fe | 65 | * initialization, we do nothing here. |
DieterGraef | 0:f9b6112278fe | 66 | */ |
DieterGraef | 0:f9b6112278fe | 67 | void magicInit() |
DieterGraef | 0:f9b6112278fe | 68 | { |
DieterGraef | 0:f9b6112278fe | 69 | return; |
DieterGraef | 0:f9b6112278fe | 70 | } |
DieterGraef | 0:f9b6112278fe | 71 | |
DieterGraef | 0:f9b6112278fe | 72 | /* |
DieterGraef | 0:f9b6112278fe | 73 | * magic - Returns the next magic number. |
DieterGraef | 0:f9b6112278fe | 74 | */ |
DieterGraef | 0:f9b6112278fe | 75 | u32_t magic() |
DieterGraef | 0:f9b6112278fe | 76 | { |
DieterGraef | 0:f9b6112278fe | 77 | return avRandom(); |
DieterGraef | 0:f9b6112278fe | 78 | } |
DieterGraef | 0:f9b6112278fe | 79 | |
DieterGraef | 0:f9b6112278fe | 80 | #endif /* PPP_SUPPORT */ |