Brandon Fictorie / Mbed 2 deprecated BF_Websocket

Dependencies:   mbed

Committer:
bfictorie
Date:
Sun Mar 25 17:26:30 2012 +0000
Revision:
0:8cdad1c73e8e

        

Who changed what in which revision?

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