This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

libMiMic(MiMic library for mbed)は、WebService機能を提供するSDKです。 mbedでWebAPIに対応したネットワークデバイスを簡単に作ることが出来ます。

libMiMicはMiMic projectで開発しています。MiMic projectについてはこちらをご覧ください。 http://nyatla.jp/mimic/wp/

構成

libMiMicはmbedRTOS上で動作し、ユーザアプリケーションにAPIを提供します。コアAPIはC言語で記述されていますが、使用頻度の高いものについてはmbed向けのC++APIが準備されています。

/media/uploads/nyatla/libmimic-sdk.png

※libMiMicはmbedの標準イーサネットドライバをしようしていません。

標準イーサネットドライバと同時に使用することはできません。

  • MiMicIP - IPv4スタックです。レテンシとメモリ消費量を抑えたuipベースのライブラリです。
  • ARP/ICMP/UDP/TCP - 基礎的なソケットAPIを提供します。APIは独自です。
  • HTTP/1.1 Server - HTTP/1.1に対応したサーバです。マルチセッション・Chunked・持続性接続に対応しています。
  • HTTP Modules - HTTP/1.1の機能モジュールです。以下のモジュールがあります。
    • ROM file provider - ROMに格納したファイルイメージを公開します。
    • File system provider - mbedファイルシステムを公開します。
    • Onchip configuration - プログラムフラッシュを利用して設定を保存します。
    • MiMicVM processor - RPCリクエスト(MiMicVM)を処理します。
    • FileUpload - ファイルアップロードを受け取ります。
    • URL decoder - HTTPリクエストを解析します。
    • UPnP handler -UPnPメッセージを処理します。
    • WebSocket - Websocketサーバです。
  • mDNS - マルチキャストDNSサービスです。
  • UPnP - UPnP/1.0の機能を提供します。UPnP handlerと協調して動作します。(現在はデバイス探索(SSDP)・デスクリプション(Description)のみ実装してあります。)
  • DHCP/APIPA - ゼロコンフィギュレーション用のモジュールです。
  • HTTP/1.1 Client
  • mbed C++ class library - mbed向けのC++CPIです。C言語のものより簡単です。

対応機種

  • mbed(mbed LPC1768)
  • LPCXpresso1769

プログラム

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

サンプル

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

チュートリアル

English

libMiMic(MiMic library for mbed) is SDK which provides Webservice functions. It can be created networking device easily using mbed.

See more MiMic information, See MiMic project website. http://nyatla.jp/mimic/wp/

Structure

libMiMic run on mbed RTOS and provides networking API to user application. This library has C++ class API for the mbed, and low-level C language API.

/media/uploads/nyatla/libmimic-sdk.png

For WebService general, it can be written in a simple C + + API.

libMiMic does not have the standard Ethernet driver of mbed. It is not possible that will be used with the standard Ethernet driver.

  • MiMicIP - IPv4 protocol stack. This is based uip which is reduced memory and latency.
  • ARP / ICMP / UDP / TCP - Those are provide basic IP protocols.
  • HTTP/1.1 Server - The Http server compatible HTTP/1.1. It supports multi-session, chunked transport, persistent connection.
  • HTTP Modules - There are addon-module for HTTP server. The following modules.
    • ROM file module - Publish the file images in ROM.
    • File system module - Publish thefiles in mbed file system.
    • Onchip configuration module - To save the network settings to the program flash via REST.
    • MiMicVM module - To handle the (MiMicVM) RPC request.
    • FileUpload module - Accept a file via HTTP POST.
    • URL dedoce module - A versatility URL decoder.
    • UPnP handle module - To handle UPnP messages.
    • UPnP - This provides UPnP/1.0 device functions. It works together with UPnP handler.
    • Websocket - websocket (version13) server
  • mDNS Service - DNS-SD protocol server.
  • UPnP - This provides UPnP/1.0 device functions which works with UPnP handler. (You have been implemented (SSDP) ? description only (Description) device search now.) It is a module zero configuration for - DHCP / APIPA. mbed C + + class library - C of mbed for + + is the CPI. It is simple than that of the C language.
  • DHCP/APIPA - It support zero-cpnfigulation.
  • mbed C++ class library. Almost APIs for Web applications are available.
  • HTTP/1.1 Client

Supported target

  • mbed(mbed LPC1768)
  • LPCXpresso1769

Application

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

Sample

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

Tutorial

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Sun Jun 30 14:17:42 2013 +0000
Parent:
40:d4e62303ad85
Child:
42:f83aa17dcae5
Commit message:
update core r270;

Changed in this revision

core/NyLPC_cMiMicEnv.h Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBasicBodyParser.c Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBasicBodyParser.h Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBasicHeaderParser.c Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBasicHeaderParser.h Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBasicHeaderParser_protected.h Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBodyParser.c Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cHttpBodyParser.h Show annotated file Show diff for this revision Revisions of this file
core/http/NyLPC_cUrlEncode.h Show annotated file Show diff for this revision Revisions of this file
core/include/NyLPC_config.h Show annotated file Show diff for this revision Revisions of this file
core/include/NyLPC_http.h Show annotated file Show diff for this revision Revisions of this file
core/include/NyLPC_net.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdConnection.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdConnection.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdConnection_protected.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread_protected.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/mod/NyLPC_cModFileIoBaseClass.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/mod/NyLPC_cModFileIoBaseClass.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/mod/NyLPC_cModUrl.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/mod/NyLPC_cModUrl.h Show annotated file Show diff for this revision Revisions of this file
core/os/NyLPC_cIsr.h Show annotated file Show diff for this revision Revisions of this file
core/os/NyLPC_cMutex.h Show annotated file Show diff for this revision Revisions of this file
core/os/NyLPC_cSemaphore.h Show annotated file Show diff for this revision Revisions of this file
core/os/NyLPC_cThread.h Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_cBaseSocket.h Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_uip.h Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_uip_ethernet.h Show annotated file Show diff for this revision Revisions of this file
--- a/core/NyLPC_cMiMicEnv.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/NyLPC_cMiMicEnv.h	Sun Jun 30 14:17:42 2013 +0000
@@ -13,7 +13,7 @@
 #endif /* __cplusplus */
 
 
-#define NyLPC_cMiMicEnv_VERSION "MiMic/1.4.10"
+#define NyLPC_cMiMicEnv_VERSION "MiMic/1.4.14"
 
 
 #ifdef __cplusplus
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/http/NyLPC_cHttpBasicBodyParser.c	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,191 @@
+#include "NyLPC_cHttpBasicBodyParser.h"
+#include <ctype.h>
+
+void NyLPC_cHttpBasicBodyParser_initialize(NyLPC_TcHttpBasicBodyParser_t* i_inst,struct NyLPC_TcHttpBasicBodyParser_Handler* i_handler)
+{
+    i_inst->_handler=i_handler;
+    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_NULL;
+}
+#define NyLPC_cHttpBasicBodyParser_finalize(i_inst)
+
+/**
+ * パーサの開始処理をします。
+ * 関数は、parseInit->parseChar[n回]->(parseStream)->parseFinishの順でコールします。
+ * parseChar、又はparseStreamでエラーが発生した場合は、後続の関数を呼び出すことは出来ません。
+ * parseCharでEOHに達した場合、parseCharまたはparseStreamを続けて呼ぶことは出来ません。
+ * parseFinishはparseCharまたはparseStreamでEOHに達した場合のみ呼び出すことが出来ます。
+ */
+void NyLPC_cHttpBasicBodyParser_parseInit(NyLPC_TcHttpBasicBodyParser_t* i_inst,const struct NyLPC_THttpBasicHeader* i_info)
+{
+    switch(i_info->transfer_encoding)
+    {
+    case NyLPC_THttpMessgeHeader_TransferEncoding_CHUNKED:
+        i_inst->_encode_type=NyLPC_THttpMessgeHeader_TransferEncoding_CHUNKED;
+        i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_START;
+        i_inst->_data.chunked.recv_len=0;
+        break;
+    default:
+        i_inst->_encode_type=NyLPC_THttpMessgeHeader_TransferEncoding_NONE;
+        i_inst->_data.normal.content_length=i_info->content_length;
+        i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_BODY;
+        break;
+    }
+}
+
+/**
+ * パーサの処理を閉じます。
+ * @return
+ * パース処理が正常に終了したかの真偽値
+ */
+NyLPC_TBool NyLPC_cHttpBasicBodyParser_parseFinish(NyLPC_TcHttpBasicBodyParser_t* i_inst)
+{
+    NyLPC_TBool ret=(i_inst->_status==NyLPC_TcHttpBasicBodyParser_ST_EOB);
+    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_NULL;
+    return ret;
+}
+#define HTTP_CR 0x0D
+#define HTTP_LF 0x0A
+#define HTTP_SP 0x20
+/**
+ * HTTPストリームをパースします。
+ * @return
+ * 処理した文字列の長さ。-1の場合エラーである。
+ * それ以外の場合ステータスをチェックすること。
+ * NyLPC_TcHttpBasicBodyParser_ST_ERROR
+ */
+NyLPC_TInt32 NyLPC_cHttpBasicBodyParser_parseChar(NyLPC_TcHttpBasicBodyParser_t* i_inst,const NyLPC_TChar* i_c,NyLPC_TInt32 i_size)
+{
+    NyLPC_TInt32 i;
+    NyLPC_TChar c;
+    switch(i_inst->_encode_type){
+    case NyLPC_THttpMessgeHeader_TransferEncoding_CHUNKED:
+        for(i=0;i<i_size;)
+        {
+            c=*(i_c+i);
+            //[:START:][:SP:][:EXT:][:BODY:][:END:]
+            switch(i_inst->_status)
+            {
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_BODY:
+                //OnRecv
+                if(!i_inst->_handler->bodyHandler(i_inst,c)){
+                    i_inst->_data.chunked.recv_len--;
+                    //中断
+                    if(i_inst->_data.chunked.recv_len==0){
+                        //content length分だけ読み取った
+                        i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_FOOTER;
+                    }
+                    return i+1;
+                }
+                i_inst->_data.chunked.recv_len--;
+                if(i_inst->_data.chunked.recv_len==0){
+                    //content length分だけ読み取った
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_FOOTER;
+                }
+                i++;//次の文字へ
+                break;
+            // HEX
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_START:
+                if(isxdigit(c)){
+                    i_inst->_data.chunked.recv_len=i_inst->_data.chunked.recv_len*16+NyLPC_ctox(c);
+                    //一応最大チャンクサイズは決めておこうか。
+                    if(i_inst->_data.chunked.recv_len>0x0fffffff){
+                        NyLPC_OnErrorGoto(ERROR);
+                    }
+                    i++;//次の文字へ
+                }else if(c==HTTP_SP){
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_SP;
+                    i++;//次の文字へ
+                }else if(c==HTTP_CR || c==HTTP_LF){
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_EXT;
+                    //読取位置を変化させずにEXTへ
+                }else{
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+                break;
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_SP:
+                if(c==HTTP_SP){
+                    i++;//次の文字へ
+                }else{
+                    //ext
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_EXT;
+                }
+                break;
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_EXT:
+                //EXTの内容は読まない。
+                if(c==HTTP_LF){
+                    if(i_inst->_data.chunked.recv_len==0){
+                        //chunksize=0でCRLFを検出したらend-chunk
+                        i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_END;
+                    }else{
+                        //chunksize>0でCRLFを検出したらBODY検出
+                        i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_BODY;
+                    }
+                }else{
+                    //nothing to do
+                }
+                i++;//次の文字へ
+                break;
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_FOOTER:
+                //CRLF待ち
+                if(c==HTTP_CR){
+                    //無視
+                }else if(c==HTTP_LF){
+                    //確定
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_START;
+                }else{
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+                i++;
+                break;
+            case NyLPC_TcHttpBasicBodyParser_ST_CHUNK_END:
+                //CRLF待ち
+                if(c==HTTP_CR){
+                    //無視
+                }else if(c==HTTP_LF){
+                    //確定
+                    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_EOB;
+                    return i+1;
+                }else{
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+                i++;
+                break;
+            default:
+                NyLPC_OnErrorGoto(ERROR);
+            }
+        }
+        return i_size;
+        break;
+    case NyLPC_THttpMessgeHeader_TransferEncoding_NONE:
+        if(i_inst->_status!=NyLPC_TcHttpBasicBodyParser_ST_BODY){
+            NyLPC_OnErrorGoto(ERROR);
+        }
+        for(i=0;i<i_size;i++)
+        {
+            if(i_inst->_data.normal.content_length>0){
+                //OnRecv
+                if(!i_inst->_handler->bodyHandler(i_inst,*(i_c+i))){
+                    i++;
+                    i_inst->_data.normal.content_length--;
+                    break;//中断(遷移無し)
+                }
+                i_inst->_data.normal.content_length--;
+            }else{
+                //content-length==0;全て受信
+                break;
+            }
+        }
+        if(i_inst->_data.normal.content_length==0){
+            //content length分だけ読み取った
+            i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_EOB;
+            return i;
+        }
+        return i;
+    }
+ERROR:
+    //ERROR
+    i_inst->_status=NyLPC_TcHttpBasicBodyParser_ST_ERROR;
+    return -1;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/http/NyLPC_cHttpBasicBodyParser.h	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,137 @@
+/*********************************************************************************
+ * PROJECT: MiMic
+ * --------------------------------------------------------------------------------
+ *
+ * This file is part of MiMic
+ * Copyright (C)2011 Ryo Iizuka
+ *
+ * MiMic is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * For further information please contact.
+ *  http://nyatla.jp/
+ *  <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
+ *
+ *********************************************************************************/
+
+#ifndef NyLPC_TcHttpBasicBodyParser_H
+#define NyLPC_TcHttpBasicBodyParser_H
+#include "NyLPC_stdlib.h"
+#include "NyLPC_cHttpStream.h"
+#include "NyLPC_cHttpBasicHeaderParser.h"
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+
+
+/**
+ * このクラスは、HttpBodyのパーサを定義します。
+ * BasicBodyParserは結果値をコールバック関数で通知します。
+ */
+typedef struct NyLPC_TcHttpBasicBodyParser NyLPC_TcHttpBasicBodyParser_t;
+
+/**
+ * BodyParserのステータス定義値。
+ */
+typedef NyLPC_TUInt8 NyLPC_TcHttpBasicBodyParser_ST;
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_START   ((NyLPC_TcHttpBasicBodyParser_ST)0x11)//ヘッダ解析待ち
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_SP      ((NyLPC_TcHttpBasicBodyParser_ST)0x12)//ヘッダ解析中
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_HEADER_EXT     ((NyLPC_TcHttpBasicBodyParser_ST)0x13)//ヘッダ解析中
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_BODY           ((NyLPC_TcHttpBasicBodyParser_ST)0x14)//フッタ解析中
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_FOOTER         ((NyLPC_TcHttpBasicBodyParser_ST)0x15)//フッタ解析中
+#define NyLPC_TcHttpBasicBodyParser_ST_CHUNK_END                ((NyLPC_TcHttpBasicBodyParser_ST)0x16)//フッタ解析中
+#define NyLPC_TcHttpBasicBodyParser_ST_BODY                 ((NyLPC_TcHttpBasicBodyParser_ST)0x17)//BODYパース中
+#define NyLPC_TcHttpBasicBodyParser_ST_EOB                  ((NyLPC_TcHttpBasicBodyParser_ST)0x7F)//BODY確定
+#define NyLPC_TcHttpBasicBodyParser_ST_ERROR                    ((NyLPC_TcHttpBasicBodyParser_ST)0x80)//終わり
+#define NyLPC_TcHttpBasicBodyParser_ST_NULL                 ((NyLPC_TcHttpBasicBodyParser_ST)0x00)//初期状態
+
+
+#define NyLPC_TcHttpBasicBodyParser_ST_isError(i_v) ((i_v)==NyLPC_TcHttpBasicBodyParser_ST_ERROR)
+
+
+/**
+ * parserのHandler
+ */
+typedef NyLPC_TBool (*NyLPC_TcHttpBasicBodyParser_bodyHandler) (NyLPC_TcHttpBasicBodyParser_t* i_inst,NyLPC_TChar i_c);
+
+struct NyLPC_TcHttpBasicBodyParser_Handler
+{
+    NyLPC_TcHttpBasicBodyParser_bodyHandler bodyHandler;
+};
+
+
+
+
+/**
+ * クラス構造体
+ */
+struct NyLPC_TcHttpBasicBodyParser
+{
+    NyLPC_THttpMessgeHeader_TransferEncoding _encode_type;
+    NyLPC_TcHttpBasicBodyParser_ST _status;
+    union{
+        struct{
+            int recv_len;
+        }chunked;
+        struct{
+            NyLPC_TUInt32 content_length;
+        }normal;
+    }_data;
+    struct NyLPC_TcHttpBasicBodyParser_Handler* _handler;
+};
+
+
+void NyLPC_cHttpBasicBodyParser_initialize(NyLPC_TcHttpBasicBodyParser_t* i_inst,struct NyLPC_TcHttpBasicBodyParser_Handler* i_handler);
+#define NyLPC_cHttpBasicBodyParser_finalize(i_inst)
+#define NyLPC_cHttpBasicBodyParser_getState(i_v) ((i_v)->_status)
+
+/**
+ * パーサの開始処理をします。
+ * 関数は、parseInit->parseChar[n回]->(parseStream)->parseFinishの順でコールします。
+ * parseChar、又はparseStreamでエラーが発生した場合は、後続の関数を呼び出すことは出来ません。
+ * parseCharでEOHに達した場合、parseCharまたはparseStreamを続けて呼ぶことは出来ません。
+ * parseFinishはparseCharまたはparseStreamでEOHに達した場合のみ呼び出すことが出来ます。
+ */
+void NyLPC_cHttpBasicBodyParser_parseInit(NyLPC_TcHttpBasicBodyParser_t* i_instt,const struct NyLPC_THttpBasicHeader* i_info);
+
+/**
+ * パーサの処理を閉じます。
+ * @return
+ * パース処理が正常に終了したかの真偽値
+ */
+NyLPC_TBool NyLPC_cHttpBasicBodyParser_parseFinish(NyLPC_TcHttpBasicBodyParser_t* i_inst);
+
+/**
+ * HTTPストリームをパースします。
+ * @return
+ */
+NyLPC_TInt32 NyLPC_cHttpBasicBodyParser_parseChar(NyLPC_TcHttpBasicBodyParser_t* i_inst,const NyLPC_TChar* i_c,NyLPC_TInt32 i_size);
+
+
+/**
+ * ストリームから読み出して、EOHに達するまでパースします。
+ * コール前にNyLPC_cHttpBasicHeaderParser_parseInitでパーサを開始してください。
+ * @return
+ * 処理が正常に終了したかを返します。
+ * TRUEの場合、ステータスはEOHに達しています。(parseFinishをコールできます。)
+ */
+//NyLPC_TcHttpBasicBodyParser_ST NyLPC_cHttpBasicHeaderParser_parseStream(NyLPC_TcHttpBasicHeaderParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream,NyLPC_TChar* i_buf,NyLPC_TUInt16 i_buf_size,NyLPC_TUInt16 i_out_size);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
--- a/core/http/NyLPC_cHttpBasicHeaderParser.c	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/http/NyLPC_cHttpBasicHeaderParser.c	Sun Jun 30 14:17:42 2013 +0000
@@ -391,10 +391,12 @@
             if(i_header->transfer_encoding!=NyLPC_THttpMessgeHeader_TransferEncoding_CHUNKED){
                 //Chunkedが無い場合はContent-Lengthは0と仮定
                 i_header->content_length=0;
+            }else{
+                //content-length無し && Chunked有
+                //OK
             }
-        }
-        //ContentLengthあるのにChunkedとは何事
-        if(i_header->transfer_encoding!=NyLPC_THttpMessgeHeader_TransferEncoding_NONE){
+        }else if(i_header->transfer_encoding!=NyLPC_THttpMessgeHeader_TransferEncoding_NONE){
+            //ContentLengthあるのにChunkedとは何事
             *o_error=400;
             break;
         }
--- a/core/http/NyLPC_cHttpBasicHeaderParser.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/http/NyLPC_cHttpBasicHeaderParser.h	Sun Jun 30 14:17:42 2013 +0000
@@ -24,8 +24,8 @@
  *
  *********************************************************************************/
 
-#ifndef NyLPC_TcHttpBasicHeader_H
-#define NyLPC_TcHttpBasicHeader_H
+#ifndef NyLPC_TcHttpBasicHeaderParser_H
+#define NyLPC_TcHttpBasicHeaderParser_H
 #include "NyLPC_stdlib.h"
 #include "NyLPC_cHttpStream.h"
 
@@ -165,11 +165,6 @@
  * <li>URLエンド - i_cに0を指定して、URLが完了した事を指示します。
  * </ol>
 */
-/**
-メッセージハンドラはNyLPC_cHttpBasicHeaderParserから3種類のメッセージを受け取ります。
-    1.URLメッセージ - i_cに\0以外の文字を指定して、URL値が入力されている事を指示します。
-    2.URLエンド - i_cに0を指定して、URLが完了した事を指示します。
-*/
 typedef NyLPC_TBool (*NyLPC_cHttpBasicHeaderParser_urlHandler) (NyLPC_TcHttpBasicHeaderParser_t* i_inst,NyLPC_TChar i_c,struct NyLPC_THttpBasicHeader* o_out);
 
 
--- a/core/http/NyLPC_cHttpBasicHeaderParser_protected.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/http/NyLPC_cHttpBasicHeaderParser_protected.h	Sun Jun 30 14:17:42 2013 +0000
@@ -25,6 +25,7 @@
  *********************************************************************************/
 #ifndef NyLPC_cHttpBasicHeaderParser_protected_h
 #define NyLPC_cHttpBasicHeaderParser_protected_h
+
 #include "NyLPC_cHttpBasicHeaderParser.h"
 
 #ifdef __cplusplus
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/http/NyLPC_cHttpBodyParser.c	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,57 @@
+#include "NyLPC_cHttpBodyParser.h"
+
+static NyLPC_TBool bodyHandler(NyLPC_TcHttpBasicBodyParser_t* i_inst,NyLPC_TChar i_c)
+{
+    NyLPC_TcHttpBodyParser_t* inst=(NyLPC_TcHttpBodyParser_t*)i_inst;
+    *(inst->ref_buf+inst->len)=i_c;
+    inst->len++;
+    return inst->buf_size>inst->len;
+}
+
+static struct NyLPC_TcHttpBasicBodyParser_Handler _bh={bodyHandler};
+
+void NyLPC_cHttpBodyParser_initialize(NyLPC_TcHttpBodyParser_t* i_inst)
+{
+    NyLPC_cHttpBasicBodyParser_initialize(&i_inst->_super,&_bh);
+}
+void NyLPC_cHttpBodyParser_finalize(NyLPC_TcHttpBodyParser_t* i_inst)
+{
+    NyLPC_cHttpBasicBodyParser_finalize(&i_inst->_super);
+}
+
+
+/**
+ * @param i_out
+ * 読み出したデータサイズ。戻り値trueの場合のみ有効。0の場合終端。
+ * @return
+ * エラーの発生状況
+ */
+NyLPC_TBool NyLPC_cHttpBodyParser_parseStream(NyLPC_TcHttpBodyParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream,NyLPC_TChar* i_buf,NyLPC_TInt16 i_buf_size,NyLPC_TInt16* i_out)
+{
+    NyLPC_TcHttpBodyParser_t* inst=(NyLPC_TcHttpBodyParser_t*)i_inst;
+    const char* rp_base;
+    NyLPC_TInt32 rsize;
+    inst->len=0;
+    inst->buf_size=i_buf_size;
+    inst->ref_buf=i_buf;
+    if(i_inst->_super._status==NyLPC_TcHttpBasicBodyParser_ST_EOB){
+        *i_out=0;
+        return NyLPC_TBool_TRUE;
+    }
+    for(;;){
+        //タイムアウト付でストリームから読み出し。
+        rsize=NyLPC_iHttpPtrStream_pread(i_stream,(const void**)(&rp_base));
+        if(rsize<=0){
+            //Read失敗
+            return NyLPC_TBool_FALSE;
+        }
+        rsize=NyLPC_cHttpBasicBodyParser_parseChar(&i_inst->_super,rp_base,rsize);
+        if(i_inst->_super._status==NyLPC_TcHttpBasicBodyParser_ST_ERROR){
+            //パース失敗
+            return NyLPC_TBool_FALSE;
+        }
+        NyLPC_iHttpPtrStream_rseek(i_stream,(NyLPC_TUInt16)rsize);
+        *i_out=i_inst->len;
+        return NyLPC_TBool_TRUE;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/http/NyLPC_cHttpBodyParser.h	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,45 @@
+#ifndef NyLPC_TcHttpBodyParser_H
+#define NyLPC_TcHttpBodyParser_H
+#include "NyLPC_cHttpBasicBodyParser.h"
+#include "NyLPC_stdlib.h"
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+typedef struct NyLPC_TcHttpBodyParser NyLPC_TcHttpBodyParser_t;
+
+struct NyLPC_TcHttpBodyParser
+{
+    NyLPC_TcHttpBasicBodyParser_t _super;
+    NyLPC_TChar* ref_buf;
+    NyLPC_TUInt16 buf_size;
+    NyLPC_TUInt16 len;
+};
+
+
+
+void NyLPC_cHttpBodyParser_initialize(NyLPC_TcHttpBodyParser_t* i_inst);
+void NyLPC_cHttpBodyParser_finalize(NyLPC_TcHttpBodyParser_t* i_inst);
+
+#define NyLPC_cHttpBodyParser_getState(i_inst) NyLPC_cHttpBasicBodyParser_getState(&((i_inst)->_super))
+#define NyLPC_cHttpBodyParser_parseInit(i_inst,i_info) NyLPC_cHttpBasicBodyParser_parseInit(&((i_inst)->_super),(i_info))
+#define NyLPC_cHttpBodyParser_parseFinish(i_inst) NyLPC_cHttpBasicBodyParser_parseFinish(&((i_inst)->_super))
+
+/**
+ * ストリームからHTTPBodyを読み出す。
+ * @param i_out
+ * 読み出したデータサイズ。戻り値trueの場合のみ有効。0の場合終端。
+ * @return
+ * エラーの発生状況
+ */
+NyLPC_TBool NyLPC_cHttpBodyParser_parseStream(NyLPC_TcHttpBodyParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream,NyLPC_TChar* i_buf,NyLPC_TInt16 i_buf_size,NyLPC_TInt16* i_out);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
--- a/core/http/NyLPC_cUrlEncode.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/http/NyLPC_cUrlEncode.h	Sun Jun 30 14:17:42 2013 +0000
@@ -23,7 +23,7 @@
 {
     /**一時バッファ */
     NyLPC_TChar v;
-    /** バッファに蓄積してる長さ*/
+    /** バッファに蓄積してる長さ */
     NyLPC_TInt8 _len;
 };
 
--- a/core/include/NyLPC_config.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/include/NyLPC_config.h	Sun Jun 30 14:17:42 2013 +0000
@@ -70,12 +70,20 @@
  * 環境定数です。アーキテクチャを選択します。NyLPC_ARCH_WIN32は、デバック用の定数です。
  * 通常は、NyLPC_ARCH_FREERTOSを使用します。
  */
-//#ifdef WIN_DEBUG
-//    #define NyLPC_ARCH NyLPC_ARCH_WIN32
-//#else
-//    #define NyLPC_ARCH NyLPC_ARCH_FREERTOS
-//#endif
-#define NyLPC_ARCH NyLPC_ARCH_MBEDRTOS
+#ifdef WIN_DEBUG
+    #define NyLPC_ARCH NyLPC_ARCH_WIN32
+#else
+    #define NyLPC_ARCH NyLPC_ARCH_MBEDRTOS
+#endif
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+//予約定義値の修正
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+#if NyLPC_ARCH==NyLPC_ARCH_WIN32
+    #define PACK_STRUCT_END
+#endif
 
 
 ////////////////////////////////////////////////////////////////////////////////////////////////
--- a/core/include/NyLPC_http.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/include/NyLPC_http.h	Sun Jun 30 14:17:42 2013 +0000
@@ -33,13 +33,14 @@
 #include "../http/NyLPC_cHttpdConfig.h"
 #include "../http/NyLPC_cHttpHeaderWriter.h"
 #include "../http/NyLPC_cHttpBodyWriter.h"
-#include "../http/NyLPC_cHttpShortRequestHeaderParser.h"
 #include "../http/NyLPC_cHttpBasicHeaderParser.h"
 #include "../http/NyLPC_cHttpStream.h"
 #include "../http/NyLPC_cHttpNullRequestHeaderParser.h"
 #include "../http/NyLPC_cMimeType.h"
 #include "../http/NyLPC_cUrlReader.h"
-
+#include "../http/NyLPC_cUrlEncode.h"
+#include "../http/NyLPC_cHttpBasicBodyParser.h"
+#include "../http/NyLPC_cHttpBodyParser.h"
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
--- a/core/include/NyLPC_net.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/include/NyLPC_net.h	Sun Jun 30 14:17:42 2013 +0000
@@ -38,6 +38,7 @@
 #include "../net/httpd/NyLPC_cHttpd.h"
 #include "../net/httpd/NyLPC_cHttpdUtils.h"
 
+#include "../net/httpd/mod/NyLPC_cModFileIoBaseClass.h"
 #include "../net/httpd/mod/NyLPC_cModRemoteMcu.h"
 #include "../net/httpd/mod/NyLPC_cModMiMicSetting.h"
 #include "../net/httpd/mod/NyLPC_cModRomFiles.h"
--- a/core/net/httpd/NyLPC_cHttpdConnection.c	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdConnection.c	Sun Jun 30 14:17:42 2013 +0000
@@ -1,8 +1,7 @@
 #include "NyLPC_cHttpdConnection_protected.h"
 #include "NyLPC_http.h"
-#include "NyLPC_net.h"
+#include "NyLPC_cHttpdUtils.h"
 #include "./NyLPC_cHttpd_protected.h"
-#include "NyLPC_cHttpdUtils.h"
 
 
 
@@ -33,6 +32,26 @@
 }
 
 #define NyLPC_cHttpHeaderWriter_CONTENT_LENGTH_UNLIMITED 0xFFFFFFFF
+
+
+NyLPC_TBool NyLPC_cHttpdConnection_send100Continue(NyLPC_TcHttpdConnection_t* i_inst)
+{
+    //状態の確認
+    if(i_inst->_res_status!=NyLPC_cHttpdConnection_ResStatus_HEAD)
+    {
+        NyLPC_OnErrorGoto(Error_Status);
+    }
+    //ステータスラインの記述
+    if(!NyLPC_iHttpPtrStream_write(&(i_inst->_in_stream),"HTTP/1.1 100 Continue\r\n\r\n",25)){
+        NyLPC_OnErrorGoto(Error);
+    }
+    return NyLPC_TBool_TRUE;
+Error:
+Error_Status:
+    i_inst->_res_status=NyLPC_cHttpdConnection_ResStatus_ERROR;
+    return NyLPC_TBool_FALSE;
+}
+
 /**
  * レスポンスヘッダを送信します。
  */
@@ -235,13 +254,13 @@
     return NyLPC_TBool_TRUE;
 }
 
-
 /**
  * コネクションのソケットをacceptします。
  */
 NyLPC_TBool NyLPC_cHttpdConnection_acceptSocket(NyLPC_TcHttpdConnection_t* i_inst)
 {
     NyLPC_Assert(i_inst->_req_status==NyLPC_cHttpdConnection_ReqStatus_ACCEPT);
+
     if(!NyLPC_cTcpSocket_accept(&(i_inst->_socket),NyLPC_cHttpdConnection_TIMEOUT_ACCEPT)){
         NyLPC_OnErrorGoto(Error);
     }
@@ -354,4 +373,4 @@
 void NyLPC_cHttpdConnection_unlock(NyLPC_TcHttpdConnection_t* i_inst)
 {
     NyLPC_cHttpd_unlock((NyLPC_TcHttpd_t*)(i_inst->_parent_httpd));
-}
\ No newline at end of file
+}
--- a/core/net/httpd/NyLPC_cHttpdConnection.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdConnection.h	Sun Jun 30 14:17:42 2013 +0000
@@ -36,6 +36,7 @@
 #define NyLPC_cHttpdConnection_ReqStatus_REQPARSE       3
 /** リクエストパース済*/
 #define NyLPC_cHttpdConnection_ReqStatus_END            4
+#define NyLPC_cHttpdConnection_ReqStatus_BODYPARSE      5
 
 
 
@@ -82,6 +83,12 @@
 void NyLPC_cHttpdConnection_initialize(NyLPC_TcHttpdConnection_t* i_inst,NyLPC_TcHttpd_t* i_parent_httpd);
 void NyLPC_cHttpdConnection_finalize(NyLPC_TcHttpdConnection_t* i_inst);
 
+/**
+ * 100 Continueをストリームに送信する。
+ * HTTP/1.1でPOSTメッセージを受け付けた場合にコールすること。
+ * この関数はステータスがNyLPC_cHttpdConnection_ResStatus_HEADの時だけ実行できる。
+ */
+NyLPC_TBool NyLPC_cHttpdConnection_send100Continue(NyLPC_TcHttpdConnection_t* i_inst);
 
 
 /**
--- a/core/net/httpd/NyLPC_cHttpdConnection_protected.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdConnection_protected.h	Sun Jun 30 14:17:42 2013 +0000
@@ -87,6 +87,7 @@
  */
 void NyLPC_cHttpdConnection_requestParsed(NyLPC_TcHttpdConnection_t* i_inst);
 
+
 /**
  * コネクションのモードをセットする。
  * この関数はhttpdハンドラのコールするモジュールが呼び出すことが有る。
--- a/core/net/httpd/NyLPC_cHttpdThread.c	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread.c	Sun Jun 30 14:17:42 2013 +0000
@@ -62,6 +62,7 @@
         {//handler
             (inst->_parent_httpd->function.onRequest)(inst);
         }
+        //@bug onRequest後だとHTTPヘッダには効果がない。強制的にConnectionModeをCloseにするフラグが必要。
         //コネクションが増えすぎたら持続性接続を停止するためにCLOSEDにする。
         if(NyLPC_cHttpd_getNumOfConnection(inst->_parent_httpd)>LIMIT_OF_PERSISTENT_CONNECTION){
             NyLPC_cHttpdConnection_setConnectionMode(inst,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
--- a/core/net/httpd/NyLPC_cHttpdThread_protected.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread_protected.h	Sun Jun 30 14:17:42 2013 +0000
@@ -21,7 +21,7 @@
 #endif
 
 /** Httpdセッションスレッドのスタックサイズ*/
-#define NyLPC_TcHttpdThread_SIZE_OF_THREAD_STACK 2048
+#define NyLPC_TcHttpdThread_SIZE_OF_THREAD_STACK 1024
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/net/httpd/mod/NyLPC_cModFileIoBaseClass.c	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,336 @@
+/*********************************************************************************
+ * PROJECT: MiMic
+ * --------------------------------------------------------------------------------
+ *
+ * This file is part of MiMic
+ * Copyright (C)2011 Ryo Iizuka
+ *
+ * MiMic is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * For further information please contact.
+ *  http://nyatla.jp/
+ *  <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
+ *
+ *********************************************************************************/
+#include "NyLPC_cModFileIoBaseClass.h"
+#include "NyLPC_stdlib.h"
+#include "NyLPC_http.h"
+#include "../NyLPC_cHttpdConnection_protected.h"
+#include "../NyLPC_cHttpdUtils.h"
+#include "NyLPC_net.h"
+
+#define MVM_VERSION "ModFileIo/1.0;Json/1.0"
+
+#define FNAME_MAX   48
+#define STRBUF_MAX  48
+
+struct TModFileIoHeader
+{
+    struct NyLPC_THttpBasicHeader super;
+    NyLPC_TUInt8 _content_id;
+    //解析用
+    NyLPC_TUInt8 _qery_name_id;
+    NyLPC_TUInt8 _astate;
+    NyLPC_TInt16 _prefix_len;
+    NyLPC_TcStr_t _tstr;
+    NyLPC_TChar _tstr_buf[STRBUF_MAX];
+    /** 文字列のパーサ*/
+    char fname[FNAME_MAX];//対象ファイル名の格納先
+};
+
+
+
+static NyLPC_TBool messageHandler(NyLPC_TcHttpBasicHeaderParser_t* i_inst,const NyLPC_TChar* i_name,NyLPC_TChar i_c,struct NyLPC_THttpBasicHeader* o_out)
+{
+    (void)i_inst;
+    (void)i_name;
+    (void)i_c;
+    return NyLPC_TBool_TRUE;
+}
+
+#define ST_PARSE_PATH 1
+#define ST_PARSE_QUERY_NAME 2
+#define ST_PARSE_QUERY_VALUE 3      //Query読み出し中
+#define ST_PARSE_QUERY_VALUE_NAME 4
+/**
+ * コンテンツID定義(コンテンツ名に対応)
+ */
+#define CONTENT_ID_UPLOAD  2
+#define CONTENT_ID_CREATE  3
+#define CONTENT_ID_REMOVE  4
+#define CONTENT_ID_UNKNOWN 0
+
+
+#define QNAME_ID_NAME    1
+#define QNAME_ID_UNKNOWN 0
+
+
+static const struct NyLPC_TTextIdTbl url_tbl[]=
+{
+    {"upload.api",CONTENT_ID_UPLOAD},
+    {"create.api",CONTENT_ID_CREATE},
+    {"remove.api",CONTENT_ID_REMOVE},
+    {NULL,CONTENT_ID_UNKNOWN}
+};
+
+static const struct NyLPC_TTextIdTbl qname_id_table[]=
+{
+    {"name",QNAME_ID_NAME},
+    {NULL,QNAME_ID_UNKNOWN}
+};
+
+
+
+static NyLPC_TBool urlHandler(NyLPC_TcHttpBasicHeaderParser_t* i_inst,NyLPC_TChar i_c,struct NyLPC_THttpBasicHeader* o_out)
+{
+    struct TModFileIoHeader* out=(struct TModFileIoHeader*)o_out;
+    //読み飛ばし
+    if(out->_prefix_len<0){
+        out->_prefix_len++;
+        return NyLPC_TBool_TRUE;//読み飛ばし
+    }
+    //Path解析
+    if(out->_astate==ST_PARSE_PATH){
+        if(i_c!='\0' && i_c!='?'){
+            if(!NyLPC_cStr_put(&(out->_tstr),i_c)){
+                //ERROR
+                NyLPC_OnErrorGoto(ERROR);
+            }
+        }else{
+            out->_content_id=NyLPC_TTextIdTbl_getMatchId(NyLPC_cStr_str(&(out->_tstr)),url_tbl);
+            switch(out->_content_id)
+            {
+            case CONTENT_ID_UPLOAD:
+            case CONTENT_ID_CREATE:
+            case CONTENT_ID_REMOVE:
+                break;
+            default:
+                NyLPC_OnErrorGoto(ERROR);
+            }
+            NyLPC_cStr_clear(&(out->_tstr));
+            out->_astate=ST_PARSE_QUERY_NAME;//クエリ名解析へ
+        }
+        return NyLPC_TBool_TRUE;
+    }
+    switch(out->_content_id)
+    {
+    case CONTENT_ID_UPLOAD:
+    case CONTENT_ID_CREATE:
+    case CONTENT_ID_REMOVE:
+        switch(out->_astate){
+        case ST_PARSE_QUERY_NAME:
+            if(i_c!='\0' && i_c!='&' && i_c!='='){
+                if(!NyLPC_cStr_put(&(out->_tstr),i_c)){
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+            }else{
+                //Query確定。
+                out->_qery_name_id=NyLPC_TTextIdTbl_getMatchId(NyLPC_cStr_str(&(out->_tstr)),qname_id_table);
+                NyLPC_cStr_clear(&(out->_tstr));
+                //クエリ値がある場合
+                switch(out->_qery_name_id){
+                case QNAME_ID_NAME:
+                    out->_astate=ST_PARSE_QUERY_VALUE_NAME;
+                    break;
+                default:
+                    out->_astate=ST_PARSE_QUERY_VALUE;
+                    break;
+                }
+            }
+            return NyLPC_TBool_TRUE;
+        case ST_PARSE_QUERY_VALUE:
+            //未知のクエリは無視
+            if(i_c!='\0' && i_c!='&'){
+            }else{
+                //クエリ値解析完了
+                out->_astate=ST_PARSE_QUERY_NAME;
+            }
+            return NyLPC_TBool_TRUE;
+        case ST_PARSE_QUERY_VALUE_NAME:
+            if(i_c!='\0' && i_c!='&'){
+                if(!NyLPC_cStr_put(&(out->_tstr),i_c)){
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+                return NyLPC_TBool_TRUE;
+            }else{
+                if(NyLPC_cStr_len(&out->_tstr)<1){
+                    //ファイル名短すぎ
+                    NyLPC_OnErrorGoto(ERROR);
+                }
+                //ファイル名を保存
+                strcpy(out->fname,(const char*)NyLPC_cStr_str(&out->_tstr));
+                //終端しているなら、次のクエリへ
+                out->_astate=ST_PARSE_QUERY_NAME;
+            }
+            return NyLPC_TBool_TRUE;
+        default:
+            break;
+        }
+        NyLPC_OnErrorGoto(ERROR);
+    default:
+        NyLPC_OnErrorGoto(ERROR);
+    }
+    return NyLPC_TBool_TRUE;
+ERROR:
+    return NyLPC_TBool_FALSE;
+}
+/**
+ * デフォルトハンドラ
+ */
+static const struct NyLPC_TcHttpBasicHeaderParser_Handler handler=
+{
+    messageHandler,
+    urlHandler
+};
+
+
+/**
+ * コンストラクタ。
+ */
+void NyLPC_cModFileIoBaseClass_initialize(NyLPC_TcModFileIoBaseClass_t* i_inst,const NyLPC_TChar* i_ref_root_path)
+{
+    NyLPC_cModRomFiles_initialize(&i_inst->super,i_ref_root_path,NULL,0);
+}
+void NyLPC_cModFileIoBaseClass_finalize(NyLPC_TcModFileIoBaseClass_t* i_inst)
+{
+    NyLPC_cModRomFiles_finalize(&i_inst->super);
+}
+/**
+ * モジュールがコネクションをハンドリングできるかを返します。
+ */
+NyLPC_TBool NyLPC_cModFileIoBaseClass_canHandle(NyLPC_TcModFileIoBaseClass_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection)
+{
+    return NyLPC_cModRomFiles_canHandle(&i_inst->super,i_connection);
+}
+
+static struct TModFileIoHeader single_header;
+
+
+/**
+ * モジュールを実行します。
+ */
+NyLPC_TBool NyLPC_cModFileIoBaseClass_execute(NyLPC_TcModFileIoBaseClass_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection)
+{
+    union{
+        NyLPC_TcHttpBasicHeaderParser_t parser;
+        NyLPC_TcHttpBodyParser_t body_parser;
+    }sh;
+    NyLPC_TUInt8 method_type;
+    //リクエストParse済へ遷移(この関数の後はModが責任を持ってリクエストを返却)
+    NyLPC_cHttpdConnection_setReqStatusParsed(i_connection);
+
+    //排他ロック
+    NyLPC_cHttpdConnection_lock(i_connection);
+    {//parser
+
+        //URL解析の準備
+        single_header._prefix_len=-((NyLPC_TInt16)strlen(i_inst->super._ref_root_path)+2);
+        single_header._astate=ST_PARSE_PATH;
+        single_header.fname[0]='\0';
+        NyLPC_cStr_initialize(&single_header._tstr,single_header._tstr_buf,STRBUF_MAX);
+
+        NyLPC_cHttpBasicHeaderParser_initialize(&sh.parser,&handler);
+
+        //プリフェッチしたデータを流す
+        NyLPC_cHttpBasicHeaderParser_parseInit(&sh.parser,&(single_header.super));
+        NyLPC_cHttpdConnection_pushPrefetchInfo(i_connection,&sh.parser,&single_header.super);
+        //後続をストリームから取り込む
+        if(!NyLPC_cHttpBasicHeaderParser_parseStream(&sh.parser,NyLPC_cHttpdConnection_refStream(i_connection),&(single_header.super))){
+            NyLPC_cHttpdUtils_sendErrorResponse(i_connection,500);
+            NyLPC_OnErrorGoto(Error1);
+        }
+        if(!NyLPC_cHttpBasicHeaderParser_parseFinish(&sh.parser,&(single_header.super))){
+            NyLPC_cHttpdUtils_sendErrorResponse(i_connection,500);
+            NyLPC_OnErrorGoto(Error1);
+        }
+        //HeaderParserはここで破棄
+        NyLPC_cHttpBasicHeaderParser_finalize(&sh.parser);
+    }
+    //Connection Modeの設定 1.1 && !closeの場合はCONTINUE
+    if(single_header.super.connection!=NyLPC_THttpMessgeHeader_Connection_CLOSE && single_header.super.startline.req.version==NyLPC_THttpVersion_11)
+    {
+        NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CONTINUE);
+    }
+    //返答フェーズ
+    {
+        method_type=NyLPC_cHttpdConnection_getMethod(i_connection);
+
+        //CGIの実行
+        switch(single_header._content_id)
+        {
+        case CONTENT_ID_UPLOAD:
+            //ファイル名とBodyParserを通知
+            if(method_type==NyLPC_THttpMethodType_POST || method_type==NyLPC_THttpMethodType_HEAD)
+            {
+                NyLPC_cHttpBodyParser_initialize(&sh.body_parser);
+                NyLPC_cHttpBodyParser_parseInit(&sh.body_parser,&single_header.super);
+                //ハンドラ内ではparseStreamのみ実行
+                if(!i_inst->_abstruct_function.upload(i_connection,single_header.fname,&sh.body_parser)){
+                    NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
+                }
+                if(NyLPC_cHttpBodyParser_parseFinish(&sh.body_parser)){
+                    NyLPC_cHttpBodyParser_finalize(&sh.body_parser);
+                    NyLPC_OnErrorGoto(Error2);//エラーメッセージはハンドラ内で送られていると仮定する。
+                }
+                NyLPC_cHttpBodyParser_finalize(&sh.body_parser);
+            }else{
+                NyLPC_OnErrorGoto(Error2);
+            }
+            break;
+        case CONTENT_ID_CREATE:
+            if(method_type==NyLPC_THttpMethodType_GET || method_type==NyLPC_THttpMethodType_HEAD)
+            {
+                //イベント起動
+                if(!i_inst->_abstruct_function.create(i_connection,single_header.fname)){
+                    NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
+                }
+                break;
+            }
+            NyLPC_OnErrorGoto(Error2_405);
+        case CONTENT_ID_REMOVE:
+            //ファイル名を通知
+            if(method_type==NyLPC_THttpMethodType_GET || method_type==NyLPC_THttpMethodType_HEAD)
+            {
+                //イベント起動
+                if(!i_inst->_abstruct_function.remove(i_connection,single_header.fname)){
+                    NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
+                }
+                break;
+            }
+            NyLPC_OnErrorGoto(Error2_405);
+        default:
+            NyLPC_cHttpdUtils_sendErrorResponse(i_connection,400);
+            NyLPC_OnErrorGoto(Error2);
+        }
+    }
+    NyLPC_cStr_finalize(&single_header._tstr);
+//占有解除
+    NyLPC_cHttpdConnection_unlock(i_connection);
+    return NyLPC_TBool_TRUE;
+Error2_405:
+    NyLPC_cHttpdUtils_sendErrorResponse(i_connection,405);
+Error2:
+    NyLPC_cStr_finalize(&single_header._tstr);
+    //VM排他ロックの解除
+    NyLPC_cHttpdConnection_unlock(i_connection);
+    return NyLPC_TBool_FALSE;
+Error1:
+    NyLPC_cHttpBasicHeaderParser_finalize(&parser);
+    NyLPC_cStr_finalize(&single_header._tstr);
+    //VM排他ロックの解除
+    NyLPC_cHttpdConnection_unlock(i_connection);
+    return NyLPC_TBool_FALSE;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/net/httpd/mod/NyLPC_cModFileIoBaseClass.h	Sun Jun 30 14:17:42 2013 +0000
@@ -0,0 +1,98 @@
+/*
+ * NyLPC_cModRemoteMcu.h
+ *
+ *  Created on: 2013/03/07
+ *      Author: nyatla
+ */
+
+#ifndef NYLPC_cModFileIoBaseClass_H_
+#define NYLPC_cModFileIoBaseClass_H_
+
+#include "NyLPC_http.h"
+#include "NyLPC_stdlib.h"
+#include "../NyLPC_cHttpdConnection.h"
+#include "NyLPC_cModRomFiles.h"
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * ファイルアップロードの為の基本シーケンスを提供する抽象クラスです。
+ * 継承クラスで_abstruct_function以下の関数に実体を設定して使います。
+ */
+typedef struct NyLPC_TcModFileIoBaseClass NyLPC_TcModFileIoBaseClass_t;
+
+/*
+ * Abstruct関数の定義
+ */
+
+/**
+ * i_fnameの内容をi_body_parserの内容で更新します。
+ * この関数はHTTPD_LOCKがかかった状態でコールされます。
+ * 関数にはコネクションにHTTP応答を返却する実装をしてください。
+ * @return
+ * 処理が失敗した場合はFALSEを返します。FALSEを返すとCallerはHTTPセッションを切断します。
+ */
+typedef NyLPC_TBool (*NyLPC_cModFileIoBaseClass_uploadFunction)(NyLPC_TcHttpdConnection_t* i_connection,const NyLPC_TChar* i_fname,NyLPC_TcHttpBodyParser_t* i_body_parser);
+/**
+ * i_fnameのファイルを作成します。
+ * この関数はHTTPD_LOCKがかかった状態でコールされます。
+ * 関数にはコネクションにHTTP応答を返却する実装をしてください。
+ * @return
+ * 処理が失敗した場合はFALSEを返します。FALSEを返すとCallerはHTTPセッションを切断します。
+ */
+typedef NyLPC_TBool (*NyLPC_cModFileIoBaseClass_createFunction)(NyLPC_TcHttpdConnection_t* i_connection,const NyLPC_TChar* i_fname);
+/**
+ * i_fnameのファイルを削除します。
+ * この関数はHTTPD_LOCKがかかった状態でコールされます。
+ * 関数にはコネクションにHTTP応答を返却する実装をしてください。
+ * @return
+ * 処理が失敗した場合はFALSEを返します。FALSEを返すとCallerはHTTPセッションを切断します。
+ */
+typedef NyLPC_TBool (*NyLPC_cModFileIoBaseClass_removeFunction)(NyLPC_TcHttpdConnection_t* i_connection,const NyLPC_TChar* i_fname);
+
+/**
+ * Abstruct関数テーブル
+ */
+struct NyLPC_TcModFileIoBaseClass_AbstructFunction
+{
+    NyLPC_cModFileIoBaseClass_uploadFunction upload;
+    NyLPC_cModFileIoBaseClass_createFunction create;
+    NyLPC_cModFileIoBaseClass_removeFunction remove;
+};
+
+/**
+ * クラス構造体
+ */
+struct NyLPC_TcModFileIoBaseClass
+{
+    NyLPC_TcModRomFiles_t super;
+    /**
+     * 処理関数へのポインタ構造体
+     */
+    struct NyLPC_TcModFileIoBaseClass_AbstructFunction _abstruct_function;
+};
+
+/**
+ * コンストラクタ。
+ */
+void NyLPC_cModFileIoBaseClass_initialize(NyLPC_TcModFileIoBaseClass_t* i_inst,const NyLPC_TChar* i_ref_root_path);
+void NyLPC_cModFileIoBaseClass_finalize(NyLPC_TcModFileIoBaseClass_t* i_inst);
+
+/**
+ * モジュールがコネクションをハンドリングできるかを返します。
+ */
+NyLPC_TBool NyLPC_cModFileIoBaseClass_canHandle(NyLPC_TcModFileIoBaseClass_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
+/**
+ * モジュールを実行します。
+ * この関数は、リクエストを解析して、抽象関数upload,create,deleteの何れかに該当する場合はそれを呼び出します。
+ * @return
+ * 処理に成功したか
+ */
+NyLPC_TBool NyLPC_cModFileIoBaseClass_execute(NyLPC_TcModFileIoBaseClass_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* NYLPC_CMODREMOTEMCU_H_ */
--- a/core/net/httpd/mod/NyLPC_cModUrl.c	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/mod/NyLPC_cModUrl.c	Sun Jun 30 14:17:42 2013 +0000
@@ -93,11 +93,11 @@
 
 void NyLPC_cModUrl_initialize(NyLPC_TcModUrl_t* i_inst)
 {
-
+    NyLPC_cHttpBodyParser_initialize(&i_inst->_body_parser);
 }
 void NyLPC_cModUrl_finalize(NyLPC_TcModUrl_t* i_inst)
 {
-
+    NyLPC_cHttpBodyParser_finalize(&i_inst->_body_parser);
 }
 
 const struct NyLPC_THttpBasicHeader* NyLPC_cModUrl_getHeader(const NyLPC_TcModUrl_t* i_inst)
@@ -146,12 +146,24 @@
     if(!NyLPC_cHttpBasicHeaderParser_parseFinish(&parser.super,&(i_inst->_header))){
         NyLPC_OnErrorGoto(Error2);
     }
-    //Connection Modeの設定 1.1 && !closeの場合はCONTINUE
-    if(i_inst->_header.connection!=NyLPC_THttpMessgeHeader_Connection_CLOSE && i_inst->_header.startline.req.version==NyLPC_THttpVersion_11)
-    {
-        NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CONTINUE);
+    if(i_inst->_header.startline.req.version==NyLPC_THttpVersion_11){
+        //Connection Modeの設定 1.1 && !closeの場合はCONTINUE
+        if(i_inst->_header.connection!=NyLPC_THttpMessgeHeader_Connection_CLOSE)
+        {
+            NyLPC_cHttpdConnection_setConnectionMode(i_connection,NyLPC_TcHttpdConnection_CONNECTION_MODE_CONTINUE);
+        }
+        //@todo http/1.1 && POSTの場合はcontinueを送る。
+        if(i_inst->_header.startline.req.method==NyLPC_THttpMethodType_POST)
+        {
+            NyLPC_cHttpdConnection_send100Continue(i_connection);
+        }
     }
     NyLPC_cHttpBasicHeaderParser_finalize(&parser);
+    //BodyParserの初期化
+    if(NyLPC_cHttpBodyParser_getState(&i_inst->_body_parser)!=NyLPC_TcHttpBasicBodyParser_ST_NULL){
+        NyLPC_cHttpBodyParser_parseFinish(&i_inst->_body_parser);
+    }
+    NyLPC_cHttpBodyParser_parseInit(&i_inst->_body_parser,&i_inst->_header);
     return NyLPC_TBool_TRUE;
 Error2:
     //400Error
@@ -163,3 +175,19 @@
 
 
 
+
+
+NyLPC_TInt16 NyLPC_cModUrl_readBody(NyLPC_TcModUrl_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection,void* i_buf,NyLPC_TInt16 i_buf_size)
+{
+    NyLPC_TInt16 l;
+    //リクエストは解析済であること
+    if(!NyLPC_cHttpdConnection_getReqStatus(i_connection)==NyLPC_cHttpdConnection_ReqStatus_END)
+    {
+        return -1;
+    }
+    if(!NyLPC_cHttpBodyParser_parseStream(&i_inst->_body_parser,NyLPC_cHttpdConnection_refStream(i_connection),i_buf,i_buf_size,&l)){
+        return -1;
+    }
+    return l;
+}
+
--- a/core/net/httpd/mod/NyLPC_cModUrl.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/net/httpd/mod/NyLPC_cModUrl.h	Sun Jun 30 14:17:42 2013 +0000
@@ -28,6 +28,7 @@
 
 #include "NyLPC_http.h"
 #include "../NyLPC_cHttpdConnection.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -48,7 +49,7 @@
 
 
 /**
- * URLを
+ * コネクションヘッダからURLを取得します。
  */
 typedef struct NyLPC_TcModUrl NyLPC_TcModUrl_t;
 
@@ -56,6 +57,7 @@
 struct NyLPC_TcModUrl
 {
     struct NyLPC_THttpBasicHeader _header;
+    NyLPC_TcHttpBodyParser_t _body_parser;
 };
 
 /**
@@ -97,6 +99,18 @@
 NyLPC_TBool NyLPC_cModUrl_execute2(NyLPC_TcModUrl_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection,char* o_url_buf,NyLPC_TInt16 i_length_buf,NyLPC_TInt16 i_pass_prefix_len, NyLPC_cModUrl_ParseMode i_mode);
 
 /**
+ * HTTPストリームからBODY部分を読み出す。
+ * この関数はexecuteが成功した後に利用できます。
+ * @param read_len
+ * 読み出したバイト数
+ * @return
+ * -1:エラー
+ * 0:終端
+ * 1以上:読み出したデータサイズ
+ */
+NyLPC_TInt16 NyLPC_cModUrl_readBody(NyLPC_TcModUrl_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection,void* i_buf,NyLPC_TInt16 i_buf_size);
+
+/**
  * basicヘッダオブジェクトを返します。
  */
 const struct NyLPC_THttpBasicHeader* NyLPC_cModUrl_getHeader(const NyLPC_TcModUrl_t* i_inst);
--- a/core/os/NyLPC_cIsr.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/os/NyLPC_cIsr.h	Sun Jun 30 14:17:42 2013 +0000
@@ -34,7 +34,8 @@
 #include "queue.h"
 #include "semphr.h"
 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS
-
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+    //not work!
 #else
 #error Bad NyLPC_ARCH!
 #endif
--- a/core/os/NyLPC_cMutex.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/os/NyLPC_cMutex.h	Sun Jun 30 14:17:42 2013 +0000
@@ -34,6 +34,8 @@
 #include "queue.h"
 #include "semphr.h"
 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+    //not implemented!
 #else
 #error Bad NyLPC_ARCH!
 #endif
@@ -49,7 +51,6 @@
  **********************************************************************/
 typedef struct NyLPC_TcMutex NyLPC_TcMutex_t;
 
-#include "NyLPC_stdlib.h"
 #if NyLPC_ARCH==NyLPC_ARCH_FREERTOS
 
 struct NyLPC_TcMutex
@@ -63,6 +64,12 @@
     void* _mutex;//rtos::Mutex*
     NyLPC_TUInt8 _lock_count;
 };
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+//not work!
+struct NyLPC_TcMutex
+{
+    int dummy;
+};
 #endif
 
 NyLPC_TBool NyLPC_cMutex_initialize(NyLPC_TcMutex_t* i_inst);
--- a/core/os/NyLPC_cSemaphore.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/os/NyLPC_cSemaphore.h	Sun Jun 30 14:17:42 2013 +0000
@@ -34,6 +34,8 @@
 #include "queue.h"
 #include "semphr.h"
 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+    //not work!
 #else
 #error Bad NyLPC_ARCH!
 #endif
@@ -59,7 +61,13 @@
 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS
 struct NyLPC_TcSemaphore
 {
-    void* _handle;//Semaphore* 
+    void* _handle;//Semaphore*
+};
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+//dumy definition!
+struct NyLPC_TcSemaphore
+{
+    int dummy;
 };
 #else
 #error Bad NyLPC_ARCH!
--- a/core/os/NyLPC_cThread.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/os/NyLPC_cThread.h	Sun Jun 30 14:17:42 2013 +0000
@@ -34,6 +34,8 @@
 #include "FreeRTOS.h"
 #include "task.h"
 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+    //not work!
 #else
 #error Bad NyLPC_ARCH!
 #endif
@@ -52,7 +54,7 @@
  */
 typedef struct NyLPC_TcThread NyLPC_TcThread_t;
 
-/** スレッドの関数型*/
+/** スレッドの関数型 */
 typedef int (*NyLPC_TcThread_ThreadFunc)(void* i_param);
 /** */
 #define NyLPC_TcThread_DEFAULT_STACKSIZE configMINIMAL_STACK_SIZE
@@ -86,7 +88,13 @@
     NyLPC_TcThread_ThreadFunc _func;
     void* _arg;
 };
-
+#elif NyLPC_ARCH==NyLPC_ARCH_WIN32
+//this is dummy definition.
+struct NyLPC_TcThread
+{
+    int dummy;
+    NyLPC_TcThread_ThreadFunc _func;
+};
 #else
 #error Bad NyLPC_ARCH!
 #endif
--- a/core/uip/NyLPC_cBaseSocket.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/uip/NyLPC_cBaseSocket.h	Sun Jun 30 14:17:42 2013 +0000
@@ -43,7 +43,7 @@
 
 struct NyLPC_TcBaseSocket
 {
-    /**タイプID 継承クラスのinitializerで設定。*/
+    /**タイプID 継承クラスのinitializerで設定。 */
     NyLPC_TUInt32 _typeid;
 };
 #define NyLPC_cBaseSocket_initialize(i_inst,i_typeid) ((i_inst)->_typeid=i_typeid)
--- a/core/uip/NyLPC_uip.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/uip/NyLPC_uip.h	Sun Jun 30 14:17:42 2013 +0000
@@ -54,8 +54,8 @@
  */
 #ifndef NyLPC_uip_h
 #define NyLPC_uip_h
+#include "../include/NyLPC_config.h"
 #include "../include/NyLPC_stdlib.h"
-#include "../include/NyLPC_config.h"
 #include "NyLPC_uip_ethernet.h"
 
 #ifdef __cplusplus
--- a/core/uip/NyLPC_uip_ethernet.h	Thu Jun 20 03:15:34 2013 +0000
+++ b/core/uip/NyLPC_uip_ethernet.h	Sun Jun 30 14:17:42 2013 +0000
@@ -54,8 +54,8 @@
  */
 #ifndef NyLPC_uip_ethernet_h
 #define NyLPC_uip_ethernet_h
+#include "../include/NyLPC_config.h"
 #include "../include/NyLPC_stdlib.h"
-#include "../include/NyLPC_config.h"
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */