hattori&ide

Dependencies:   mbed

Committer:
hattori_atsushi
Date:
Sun Dec 18 08:16:01 2022 +0000
Revision:
0:f77369cabd75
hattori

Who changed what in which revision?

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