EthernetNetIf

Dependents:   XBee_WiFi_EA_LPC4088

Committer:
hmike
Date:
Wed Nov 19 12:00:42 2014 +0000
Revision:
0:62580107d20c
EthernetNetIf

Who changed what in which revision?

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