Committer:
mbed714
Date:
Sat Sep 18 23:05:49 2010 +0000
Revision:
0:d616ece2d859

        

Who changed what in which revision?

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