ID the MBED processor on the network if you have more than one. View MBED name on DHCP of your Router - Example \"MBED PE\" Change your ID in Core / host.h

Committer:
JeffM
Date:
Sat Nov 06 14:11:02 2010 +0000
Revision:
0:fd3b85615428
MBED ID 1A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JeffM 0:fd3b85615428 1 /*****************************************************************************
JeffM 0:fd3b85615428 2 * pap.h - PPP Password Authentication Protocol header file.
JeffM 0:fd3b85615428 3 *
JeffM 0:fd3b85615428 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
JeffM 0:fd3b85615428 5 * portions Copyright (c) 1997 Global Election Systems Inc.
JeffM 0:fd3b85615428 6 *
JeffM 0:fd3b85615428 7 * The authors hereby grant permission to use, copy, modify, distribute,
JeffM 0:fd3b85615428 8 * and license this software and its documentation for any purpose, provided
JeffM 0:fd3b85615428 9 * that existing copyright notices are retained in all copies and that this
JeffM 0:fd3b85615428 10 * notice and the following disclaimer are included verbatim in any
JeffM 0:fd3b85615428 11 * distributions. No written agreement, license, or royalty fee is required
JeffM 0:fd3b85615428 12 * for any of the authorized uses.
JeffM 0:fd3b85615428 13 *
JeffM 0:fd3b85615428 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
JeffM 0:fd3b85615428 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
JeffM 0:fd3b85615428 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
JeffM 0:fd3b85615428 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
JeffM 0:fd3b85615428 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
JeffM 0:fd3b85615428 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
JeffM 0:fd3b85615428 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
JeffM 0:fd3b85615428 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
JeffM 0:fd3b85615428 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
JeffM 0:fd3b85615428 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
JeffM 0:fd3b85615428 24 *
JeffM 0:fd3b85615428 25 ******************************************************************************
JeffM 0:fd3b85615428 26 * REVISION HISTORY
JeffM 0:fd3b85615428 27 *
JeffM 0:fd3b85615428 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
JeffM 0:fd3b85615428 29 * Ported to lwIP.
JeffM 0:fd3b85615428 30 * 97-12-04 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
JeffM 0:fd3b85615428 31 * Original derived from BSD codes.
JeffM 0:fd3b85615428 32 *****************************************************************************/
JeffM 0:fd3b85615428 33 /*
JeffM 0:fd3b85615428 34 * upap.h - User/Password Authentication Protocol definitions.
JeffM 0:fd3b85615428 35 *
JeffM 0:fd3b85615428 36 * Copyright (c) 1989 Carnegie Mellon University.
JeffM 0:fd3b85615428 37 * All rights reserved.
JeffM 0:fd3b85615428 38 *
JeffM 0:fd3b85615428 39 * Redistribution and use in source and binary forms are permitted
JeffM 0:fd3b85615428 40 * provided that the above copyright notice and this paragraph are
JeffM 0:fd3b85615428 41 * duplicated in all such forms and that any documentation,
JeffM 0:fd3b85615428 42 * advertising materials, and other materials related to such
JeffM 0:fd3b85615428 43 * distribution and use acknowledge that the software was developed
JeffM 0:fd3b85615428 44 * by Carnegie Mellon University. The name of the
JeffM 0:fd3b85615428 45 * University may not be used to endorse or promote products derived
JeffM 0:fd3b85615428 46 * from this software without specific prior written permission.
JeffM 0:fd3b85615428 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
JeffM 0:fd3b85615428 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
JeffM 0:fd3b85615428 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
JeffM 0:fd3b85615428 50 */
JeffM 0:fd3b85615428 51
JeffM 0:fd3b85615428 52 #ifndef PAP_H
JeffM 0:fd3b85615428 53 #define PAP_H
JeffM 0:fd3b85615428 54
JeffM 0:fd3b85615428 55 #if PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
JeffM 0:fd3b85615428 56
JeffM 0:fd3b85615428 57 /*
JeffM 0:fd3b85615428 58 * Packet header = Code, id, length.
JeffM 0:fd3b85615428 59 */
JeffM 0:fd3b85615428 60 #define UPAP_HEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
JeffM 0:fd3b85615428 61
JeffM 0:fd3b85615428 62
JeffM 0:fd3b85615428 63 /*
JeffM 0:fd3b85615428 64 * UPAP codes.
JeffM 0:fd3b85615428 65 */
JeffM 0:fd3b85615428 66 #define UPAP_AUTHREQ 1 /* Authenticate-Request */
JeffM 0:fd3b85615428 67 #define UPAP_AUTHACK 2 /* Authenticate-Ack */
JeffM 0:fd3b85615428 68 #define UPAP_AUTHNAK 3 /* Authenticate-Nak */
JeffM 0:fd3b85615428 69
JeffM 0:fd3b85615428 70 /*
JeffM 0:fd3b85615428 71 * Each interface is described by upap structure.
JeffM 0:fd3b85615428 72 */
JeffM 0:fd3b85615428 73 typedef struct upap_state {
JeffM 0:fd3b85615428 74 int us_unit; /* Interface unit number */
JeffM 0:fd3b85615428 75 const char *us_user; /* User */
JeffM 0:fd3b85615428 76 int us_userlen; /* User length */
JeffM 0:fd3b85615428 77 const char *us_passwd; /* Password */
JeffM 0:fd3b85615428 78 int us_passwdlen; /* Password length */
JeffM 0:fd3b85615428 79 int us_clientstate; /* Client state */
JeffM 0:fd3b85615428 80 int us_serverstate; /* Server state */
JeffM 0:fd3b85615428 81 u_char us_id; /* Current id */
JeffM 0:fd3b85615428 82 int us_timeouttime; /* Timeout (seconds) for auth-req retrans. */
JeffM 0:fd3b85615428 83 int us_transmits; /* Number of auth-reqs sent */
JeffM 0:fd3b85615428 84 int us_maxtransmits; /* Maximum number of auth-reqs to send */
JeffM 0:fd3b85615428 85 int us_reqtimeout; /* Time to wait for auth-req from peer */
JeffM 0:fd3b85615428 86 } upap_state;
JeffM 0:fd3b85615428 87
JeffM 0:fd3b85615428 88 /*
JeffM 0:fd3b85615428 89 * Client states.
JeffM 0:fd3b85615428 90 */
JeffM 0:fd3b85615428 91 #define UPAPCS_INITIAL 0 /* Connection down */
JeffM 0:fd3b85615428 92 #define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */
JeffM 0:fd3b85615428 93 #define UPAPCS_PENDING 2 /* Connection down, have requested auth */
JeffM 0:fd3b85615428 94 #define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */
JeffM 0:fd3b85615428 95 #define UPAPCS_OPEN 4 /* We've received an Ack */
JeffM 0:fd3b85615428 96 #define UPAPCS_BADAUTH 5 /* We've received a Nak */
JeffM 0:fd3b85615428 97
JeffM 0:fd3b85615428 98 /*
JeffM 0:fd3b85615428 99 * Server states.
JeffM 0:fd3b85615428 100 */
JeffM 0:fd3b85615428 101 #define UPAPSS_INITIAL 0 /* Connection down */
JeffM 0:fd3b85615428 102 #define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */
JeffM 0:fd3b85615428 103 #define UPAPSS_PENDING 2 /* Connection down, have requested auth */
JeffM 0:fd3b85615428 104 #define UPAPSS_LISTEN 3 /* Listening for an Authenticate */
JeffM 0:fd3b85615428 105 #define UPAPSS_OPEN 4 /* We've sent an Ack */
JeffM 0:fd3b85615428 106 #define UPAPSS_BADAUTH 5 /* We've sent a Nak */
JeffM 0:fd3b85615428 107
JeffM 0:fd3b85615428 108
JeffM 0:fd3b85615428 109 extern upap_state upap[];
JeffM 0:fd3b85615428 110
JeffM 0:fd3b85615428 111 void upap_authwithpeer (int, char *, char *);
JeffM 0:fd3b85615428 112 void upap_authpeer (int);
JeffM 0:fd3b85615428 113
JeffM 0:fd3b85615428 114 extern struct protent pap_protent;
JeffM 0:fd3b85615428 115
JeffM 0:fd3b85615428 116 #endif /* PAP_SUPPORT */
JeffM 0:fd3b85615428 117
JeffM 0:fd3b85615428 118 #endif /* PAP_H */