Dependencies:   FatFileSystem mbed WeatherMeters SDFileSystem

Committer:
dcoban
Date:
Tue Apr 03 18:43:13 2012 +0000
Revision:
0:1a61c61d0845

        

Who changed what in which revision?

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