Michael Fischler / Mbed 2 deprecated Contest_Winner

Dependencies:   mbed

Committer:
mafischl
Date:
Thu Oct 13 17:02:29 2011 +0000
Revision:
0:d9266031f832

        

Who changed what in which revision?

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