Rik Van Dyck / Mbed 2 deprecated Project_Embedded_C

Dependencies:   mbed DS1307 Servo TextLCD

Committer:
rikvandyck
Date:
Thu Dec 18 10:43:07 2014 +0000
Revision:
2:55b6fd49b738
Parent:
0:e1edd52b1ee2
Project_Embedded_C

Who changed what in which revision?

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