A modified version of http://mbed.org/users/segundo/libraries/NetServices/ljhqix to add HTTP proxy feature (based on http://mbed.org/users/igorsk/programs/NetServicesSource/ltjpag)

Dependents:   SenseClient

Committer:
mimil
Date:
Tue Sep 06 13:26:45 2011 +0000
Revision:
0:308f83189a3f

        

Who changed what in which revision?

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