Dependencies: FatFileSystem mbed WeatherMeters SDFileSystem
NetStack/lwip/netif/ppp/auth.h@0:1a61c61d0845, 2012-04-03 (annotated)
- Committer:
- dcoban
- Date:
- Tue Apr 03 18:43:13 2012 +0000
- Revision:
- 0:1a61c61d0845
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dcoban | 0:1a61c61d0845 | 1 | /***************************************************************************** |
dcoban | 0:1a61c61d0845 | 2 | * auth.h - PPP Authentication and phase control header file. |
dcoban | 0:1a61c61d0845 | 3 | * |
dcoban | 0:1a61c61d0845 | 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. |
dcoban | 0:1a61c61d0845 | 5 | * portions Copyright (c) 1998 Global Election Systems Inc. |
dcoban | 0:1a61c61d0845 | 6 | * |
dcoban | 0:1a61c61d0845 | 7 | * The authors hereby grant permission to use, copy, modify, distribute, |
dcoban | 0:1a61c61d0845 | 8 | * and license this software and its documentation for any purpose, provided |
dcoban | 0:1a61c61d0845 | 9 | * that existing copyright notices are retained in all copies and that this |
dcoban | 0:1a61c61d0845 | 10 | * notice and the following disclaimer are included verbatim in any |
dcoban | 0:1a61c61d0845 | 11 | * distributions. No written agreement, license, or royalty fee is required |
dcoban | 0:1a61c61d0845 | 12 | * for any of the authorized uses. |
dcoban | 0:1a61c61d0845 | 13 | * |
dcoban | 0:1a61c61d0845 | 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR |
dcoban | 0:1a61c61d0845 | 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
dcoban | 0:1a61c61d0845 | 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
dcoban | 0:1a61c61d0845 | 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
dcoban | 0:1a61c61d0845 | 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
dcoban | 0:1a61c61d0845 | 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
dcoban | 0:1a61c61d0845 | 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
dcoban | 0:1a61c61d0845 | 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
dcoban | 0:1a61c61d0845 | 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
dcoban | 0:1a61c61d0845 | 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dcoban | 0:1a61c61d0845 | 24 | * |
dcoban | 0:1a61c61d0845 | 25 | ****************************************************************************** |
dcoban | 0:1a61c61d0845 | 26 | * REVISION HISTORY |
dcoban | 0:1a61c61d0845 | 27 | * |
dcoban | 0:1a61c61d0845 | 28 | * 03-01-01 Marc Boucher <marc@mbsi.ca> |
dcoban | 0:1a61c61d0845 | 29 | * Ported to lwIP. |
dcoban | 0:1a61c61d0845 | 30 | * 97-12-04 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc. |
dcoban | 0:1a61c61d0845 | 31 | * Original derived from BSD pppd.h. |
dcoban | 0:1a61c61d0845 | 32 | *****************************************************************************/ |
dcoban | 0:1a61c61d0845 | 33 | /* |
dcoban | 0:1a61c61d0845 | 34 | * pppd.h - PPP daemon global declarations. |
dcoban | 0:1a61c61d0845 | 35 | * |
dcoban | 0:1a61c61d0845 | 36 | * Copyright (c) 1989 Carnegie Mellon University. |
dcoban | 0:1a61c61d0845 | 37 | * All rights reserved. |
dcoban | 0:1a61c61d0845 | 38 | * |
dcoban | 0:1a61c61d0845 | 39 | * Redistribution and use in source and binary forms are permitted |
dcoban | 0:1a61c61d0845 | 40 | * provided that the above copyright notice and this paragraph are |
dcoban | 0:1a61c61d0845 | 41 | * duplicated in all such forms and that any documentation, |
dcoban | 0:1a61c61d0845 | 42 | * advertising materials, and other materials related to such |
dcoban | 0:1a61c61d0845 | 43 | * distribution and use acknowledge that the software was developed |
dcoban | 0:1a61c61d0845 | 44 | * by Carnegie Mellon University. The name of the |
dcoban | 0:1a61c61d0845 | 45 | * University may not be used to endorse or promote products derived |
dcoban | 0:1a61c61d0845 | 46 | * from this software without specific prior written permission. |
dcoban | 0:1a61c61d0845 | 47 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
dcoban | 0:1a61c61d0845 | 48 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
dcoban | 0:1a61c61d0845 | 49 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
dcoban | 0:1a61c61d0845 | 50 | * |
dcoban | 0:1a61c61d0845 | 51 | */ |
dcoban | 0:1a61c61d0845 | 52 | |
dcoban | 0:1a61c61d0845 | 53 | #ifndef AUTH_H |
dcoban | 0:1a61c61d0845 | 54 | #define AUTH_H |
dcoban | 0:1a61c61d0845 | 55 | |
dcoban | 0:1a61c61d0845 | 56 | /*********************** |
dcoban | 0:1a61c61d0845 | 57 | *** PUBLIC FUNCTIONS *** |
dcoban | 0:1a61c61d0845 | 58 | ***********************/ |
dcoban | 0:1a61c61d0845 | 59 | |
dcoban | 0:1a61c61d0845 | 60 | /* we are starting to use the link */ |
dcoban | 0:1a61c61d0845 | 61 | void link_required (int); |
dcoban | 0:1a61c61d0845 | 62 | |
dcoban | 0:1a61c61d0845 | 63 | /* we are finished with the link */ |
dcoban | 0:1a61c61d0845 | 64 | void link_terminated (int); |
dcoban | 0:1a61c61d0845 | 65 | |
dcoban | 0:1a61c61d0845 | 66 | /* the LCP layer has left the Opened state */ |
dcoban | 0:1a61c61d0845 | 67 | void link_down (int); |
dcoban | 0:1a61c61d0845 | 68 | |
dcoban | 0:1a61c61d0845 | 69 | /* the link is up; authenticate now */ |
dcoban | 0:1a61c61d0845 | 70 | void link_established (int); |
dcoban | 0:1a61c61d0845 | 71 | |
dcoban | 0:1a61c61d0845 | 72 | /* a network protocol has come up */ |
dcoban | 0:1a61c61d0845 | 73 | void np_up (int, u16_t); |
dcoban | 0:1a61c61d0845 | 74 | |
dcoban | 0:1a61c61d0845 | 75 | /* a network protocol has gone down */ |
dcoban | 0:1a61c61d0845 | 76 | void np_down (int, u16_t); |
dcoban | 0:1a61c61d0845 | 77 | |
dcoban | 0:1a61c61d0845 | 78 | /* a network protocol no longer needs link */ |
dcoban | 0:1a61c61d0845 | 79 | void np_finished (int, u16_t); |
dcoban | 0:1a61c61d0845 | 80 | |
dcoban | 0:1a61c61d0845 | 81 | /* peer failed to authenticate itself */ |
dcoban | 0:1a61c61d0845 | 82 | void auth_peer_fail (int, u16_t); |
dcoban | 0:1a61c61d0845 | 83 | |
dcoban | 0:1a61c61d0845 | 84 | /* peer successfully authenticated itself */ |
dcoban | 0:1a61c61d0845 | 85 | void auth_peer_success (int, u16_t, char *, int); |
dcoban | 0:1a61c61d0845 | 86 | |
dcoban | 0:1a61c61d0845 | 87 | /* we failed to authenticate ourselves */ |
dcoban | 0:1a61c61d0845 | 88 | void auth_withpeer_fail (int, u16_t); |
dcoban | 0:1a61c61d0845 | 89 | |
dcoban | 0:1a61c61d0845 | 90 | /* we successfully authenticated ourselves */ |
dcoban | 0:1a61c61d0845 | 91 | void auth_withpeer_success (int, u16_t); |
dcoban | 0:1a61c61d0845 | 92 | |
dcoban | 0:1a61c61d0845 | 93 | /* check authentication options supplied */ |
dcoban | 0:1a61c61d0845 | 94 | void auth_check_options (void); |
dcoban | 0:1a61c61d0845 | 95 | |
dcoban | 0:1a61c61d0845 | 96 | /* check what secrets we have */ |
dcoban | 0:1a61c61d0845 | 97 | void auth_reset (int); |
dcoban | 0:1a61c61d0845 | 98 | |
dcoban | 0:1a61c61d0845 | 99 | /* Check peer-supplied username/password */ |
dcoban | 0:1a61c61d0845 | 100 | u_char check_passwd (int, char *, int, char *, int, char **, int *); |
dcoban | 0:1a61c61d0845 | 101 | |
dcoban | 0:1a61c61d0845 | 102 | /* get "secret" for chap */ |
dcoban | 0:1a61c61d0845 | 103 | int get_secret (int, char *, char *, char *, int *, int); |
dcoban | 0:1a61c61d0845 | 104 | |
dcoban | 0:1a61c61d0845 | 105 | /* check if IP address is authorized */ |
dcoban | 0:1a61c61d0845 | 106 | int auth_ip_addr (int, u32_t); |
dcoban | 0:1a61c61d0845 | 107 | |
dcoban | 0:1a61c61d0845 | 108 | /* check if IP address is unreasonable */ |
dcoban | 0:1a61c61d0845 | 109 | int bad_ip_adrs (u32_t); |
dcoban | 0:1a61c61d0845 | 110 | |
dcoban | 0:1a61c61d0845 | 111 | #endif /* AUTH_H */ |