Bonjour/Zerconf library

Dependencies:   mbed

Committer:
dirkx
Date:
Sat Aug 14 15:54:31 2010 +0000
Revision:
5:8e53abda9900
Parent:
0:355018f44c9f

        

Who changed what in which revision?

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