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