Rik Van Dyck / Mbed 2 deprecated Project_Embedded_C

Dependencies:   mbed DS1307 Servo TextLCD

Committer:
rikvandyck
Date:
Thu Dec 04 10:44:07 2014 +0000
Revision:
0:e1edd52b1ee2
test

Who changed what in which revision?

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