This library is stripped down version of NetServices library. HTTP server and client function is NOT supported.

Dependents:   imu-daq-eth

Committer:
idinor
Date:
Wed Jul 20 11:45:39 2011 +0000
Revision:
0:dcf3c92487ca

        

Who changed what in which revision?

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