First step: AutoIP compiled in and working

Dependencies:   mbed

Committer:
darran
Date:
Fri Jun 18 09:11:35 2010 +0000
Revision:
0:55a05330f8cc

        

Who changed what in which revision?

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