Measure system

Dependencies:   EthernetNetIf mbed RF12B

Committer:
benecsj
Date:
Thu Mar 10 19:56:45 2011 +0000
Revision:
1:b26ab2467b1a

        

Who changed what in which revision?

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