This library is stripped down version of NetServices library. HTTP server and client function is NOT supported.

Dependents:   imu-daq-eth

Committer:
idinor
Date:
Wed Jul 20 11:45:39 2011 +0000
Revision:
0:dcf3c92487ca

        

Who changed what in which revision?

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