Dependents:   RTnoV3 RTnoV3_LED RTnoV3_Template RTnoV3_ADC ... more

Committer:
sherckuith
Date:
Sat Dec 31 11:25:27 2011 +0000
Revision:
0:479ce5546098
Ethernet

Who changed what in which revision?

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