Example self-announcing webserver which controls a servo through a smallHTML userinterface.

Dependencies:   mbed

Committer:
dirkx
Date:
Sat Aug 14 15:56:01 2010 +0000
Revision:
0:a259777c45a3

        

Who changed what in which revision?

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