hiroshi matsumoto / EthernetNetIf
Committer:
jh1cdv00
Date:
Tue Jan 27 01:38:19 2015 +0000
Revision:
0:f35dada1dac1
lpc1768

Who changed what in which revision?

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