Example self-announcing webserver which controls a servo through a smallHTML userinterface.

Dependencies:   mbed

Committer:
dirkx
Date:
Sat Aug 14 15:56:01 2010 +0000
Revision:
0:a259777c45a3

        

Who changed what in which revision?

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