ソースの整理中ですが、利用はできます。 大きなファイルはできないかもしれません。

Dependencies:   EthernetInterface HttpServer TextLCD expatlib mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Fork of giken9_HTMLServer_Sample by Yasushi TAUCHI

Committer:
yueee_yt
Date:
Wed Mar 12 04:19:54 2014 +0000
Revision:
0:7766f6712673
???????????????

Who changed what in which revision?

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