First step: AutoIP compiled in and working

Dependencies:   mbed

Committer:
darran
Date:
Fri Jun 18 15:54:21 2010 +0000
Revision:
1:4218cacaf696
Parent:
0:55a05330f8cc

        

Who changed what in which revision?

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