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