<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="httpd_8h" kind="file" language="C++">
    <compoundname>httpd.h</compoundname>
    <includes refid="httpd__opts_8h" local="yes">httpd_opts.h</includes>
    <includes local="yes">lwip/err.h</includes>
    <includes local="yes">lwip/pbuf.h</includes>
    <incdepgraph>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/include/net/apps/httpd.h</label>
        <link refid="httpd_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>lwip/opt.h</label>
      </node>
      <node id="4">
        <label>lwip/err.h</label>
      </node>
      <node id="5">
        <label>lwip/pbuf.h</label>
      </node>
      <node id="2">
        <label>httpd_opts.h</label>
        <link refid="httpd__opts_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="httpd_8h_1ac364305cee969a0be43c071722b136e6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void httpd_init</definition>
        <argsstring>(void)</argsstring>
        <name>httpd_init</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/include/net/apps/httpd.h" line="229" column="6" declfile="C:/Dev/git/UbixOS/sys/include/net/apps/httpd.h" declline="229" declcolumn="6"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>HTTP server </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="6"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2001-2003<sp/>Swedish<sp/>Institute<sp/>of<sp/>Computer<sp/>Science.</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/>1.<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>2.<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/>documentation</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/>3.<sp/>The<sp/>name<sp/>of<sp/>the<sp/>author<sp/>may<sp/>not<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING</highlight></codeline>
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>the<sp/>lwIP<sp/>TCP/IP<sp/>stack.</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/>&lt;adam@sics.se&gt;</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="36"><highlight class="comment"><sp/>*<sp/>This<sp/>version<sp/>of<sp/>the<sp/>file<sp/>has<sp/>been<sp/>modified<sp/>by<sp/>Texas<sp/>Instruments<sp/>to<sp/>offer</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*<sp/>simple<sp/>server-side-include<sp/>(SSI)<sp/>and<sp/>Common<sp/>Gateway<sp/>Interface<sp/>(CGI)</highlight></codeline>
<codeline lineno="38"><highlight class="comment"><sp/>*<sp/>capability.</highlight></codeline>
<codeline lineno="39"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>LWIP_HDR_APPS_HTTPD_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_HDR_APPS_HTTPD_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="httpd__opts_8h" kindref="compound">httpd_opts.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;lwip/err.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;lwip/pbuf.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;C&quot;</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_CGI</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="55"><highlight class="comment"><sp/>*<sp/>Function<sp/>pointer<sp/>for<sp/>a<sp/>CGI<sp/>script<sp/>handler.</highlight></codeline>
<codeline lineno="56"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="57"><highlight class="comment"><sp/>*<sp/>This<sp/>function<sp/>is<sp/>called<sp/>each<sp/>time<sp/>the<sp/>HTTPD<sp/>server<sp/>is<sp/>asked<sp/>for<sp/>a<sp/>file</highlight></codeline>
<codeline lineno="58"><highlight class="comment"><sp/>*<sp/>whose<sp/>name<sp/>was<sp/>previously<sp/>registered<sp/>as<sp/>a<sp/>CGI<sp/>function<sp/>using<sp/>a<sp/>call<sp/>to</highlight></codeline>
<codeline lineno="59"><highlight class="comment"><sp/>*<sp/>http_set_cgi_handler.<sp/>The<sp/>iIndex<sp/>parameter<sp/>provides<sp/>the<sp/>index<sp/>of<sp/>the</highlight></codeline>
<codeline lineno="60"><highlight class="comment"><sp/>*<sp/>CGI<sp/>within<sp/>the<sp/>ppcURLs<sp/>array<sp/>passed<sp/>to<sp/>http_set_cgi_handler.<sp/>Parameters</highlight></codeline>
<codeline lineno="61"><highlight class="comment"><sp/>*<sp/>pcParam<sp/>and<sp/>pcValue<sp/>provide<sp/>access<sp/>to<sp/>the<sp/>parameters<sp/>provided<sp/>along<sp/>with</highlight></codeline>
<codeline lineno="62"><highlight class="comment"><sp/>*<sp/>the<sp/>URI.<sp/>iNumParams<sp/>provides<sp/>a<sp/>count<sp/>of<sp/>the<sp/>entries<sp/>in<sp/>the<sp/>pcParam<sp/>and</highlight></codeline>
<codeline lineno="63"><highlight class="comment"><sp/>*<sp/>pcValue<sp/>arrays.<sp/>Each<sp/>entry<sp/>in<sp/>the<sp/>pcParam<sp/>array<sp/>contains<sp/>the<sp/>name<sp/>of<sp/>a</highlight></codeline>
<codeline lineno="64"><highlight class="comment"><sp/>*<sp/>parameter<sp/>with<sp/>the<sp/>corresponding<sp/>entry<sp/>in<sp/>the<sp/>pcValue<sp/>array<sp/>containing<sp/>the</highlight></codeline>
<codeline lineno="65"><highlight class="comment"><sp/>*<sp/>value<sp/>for<sp/>that<sp/>parameter.<sp/>Note<sp/>that<sp/>pcParam<sp/>may<sp/>contain<sp/>multiple<sp/>elements</highlight></codeline>
<codeline lineno="66"><highlight class="comment"><sp/>*<sp/>with<sp/>the<sp/>same<sp/>name<sp/>if,<sp/>for<sp/>example,<sp/>a<sp/>multi-selection<sp/>list<sp/>control<sp/>is<sp/>used</highlight></codeline>
<codeline lineno="67"><highlight class="comment"><sp/>*<sp/>in<sp/>the<sp/>form<sp/>generating<sp/>the<sp/>data.</highlight></codeline>
<codeline lineno="68"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="69"><highlight class="comment"><sp/>*<sp/>The<sp/>function<sp/>should<sp/>return<sp/>a<sp/>pointer<sp/>to<sp/>a<sp/>character<sp/>string<sp/>which<sp/>is<sp/>the</highlight></codeline>
<codeline lineno="70"><highlight class="comment"><sp/>*<sp/>path<sp/>and<sp/>filename<sp/>of<sp/>the<sp/>response<sp/>that<sp/>is<sp/>to<sp/>be<sp/>sent<sp/>to<sp/>the<sp/>connected</highlight></codeline>
<codeline lineno="71"><highlight class="comment"><sp/>*<sp/>browser,<sp/>for<sp/>example<sp/>&quot;/thanks.htm&quot;<sp/>or<sp/>&quot;/response/error.ssi&quot;.</highlight></codeline>
<codeline lineno="72"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="73"><highlight class="comment"><sp/>*<sp/>The<sp/>maximum<sp/>number<sp/>of<sp/>parameters<sp/>that<sp/>will<sp/>be<sp/>passed<sp/>to<sp/>this<sp/>function<sp/>via</highlight></codeline>
<codeline lineno="74"><highlight class="comment"><sp/>*<sp/>iNumParams<sp/>is<sp/>defined<sp/>by<sp/>LWIP_HTTPD_MAX_CGI_PARAMETERS.<sp/>Any<sp/>parameters<sp/>in<sp/>the<sp/>incoming</highlight></codeline>
<codeline lineno="75"><highlight class="comment"><sp/>*<sp/>HTTP<sp/>request<sp/>above<sp/>this<sp/>number<sp/>will<sp/>be<sp/>discarded.</highlight></codeline>
<codeline lineno="76"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="77"><highlight class="comment"><sp/>*<sp/>Requests<sp/>intended<sp/>for<sp/>use<sp/>by<sp/>this<sp/>CGI<sp/>mechanism<sp/>must<sp/>be<sp/>sent<sp/>using<sp/>the<sp/>GET</highlight></codeline>
<codeline lineno="78"><highlight class="comment"><sp/>*<sp/>method<sp/>(which<sp/>encodes<sp/>all<sp/>parameters<sp/>within<sp/>the<sp/>URI<sp/>rather<sp/>than<sp/>in<sp/>a<sp/>block</highlight></codeline>
<codeline lineno="79"><highlight class="comment"><sp/>*<sp/>later<sp/>in<sp/>the<sp/>request).<sp/>Attempts<sp/>to<sp/>use<sp/>the<sp/>POST<sp/>method<sp/>will<sp/>result<sp/>in<sp/>the</highlight></codeline>
<codeline lineno="80"><highlight class="comment"><sp/>*<sp/>request<sp/>being<sp/>ignored.</highlight></codeline>
<codeline lineno="81"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="82"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*(*tCGIHandler)(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iIndex,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iNumParams,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*pcParam[],</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*pcValue[]);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="87"><highlight class="comment"><sp/>*<sp/>Structure<sp/>defining<sp/>the<sp/>base<sp/>filename<sp/>(URL)<sp/>of<sp/>a<sp/>CGI<sp/>and<sp/>the<sp/>associated</highlight></codeline>
<codeline lineno="88"><highlight class="comment"><sp/>*<sp/>function<sp/>which<sp/>is<sp/>to<sp/>be<sp/>called<sp/>when<sp/>that<sp/>URL<sp/>is<sp/>requested.</highlight></codeline>
<codeline lineno="89"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal">{</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*pcCGIName;</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/>tCGIHandler<sp/>pfnCGIHandler;</highlight></codeline>
<codeline lineno="94"><highlight class="normal">}<sp/>tCGI;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>http_set_cgi_handlers(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>tCGI<sp/>*pCGIs,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iNumHandlers);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_CGI<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_CGI<sp/>||<sp/>LWIP_HTTPD_CGI_SSI</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_CGI_SSI</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>httpd_cgi_handler(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>uri,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iNumParams,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**pcParam,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**pcValue</highlight></codeline>
<codeline lineno="108"><highlight class="normal">#</highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>defined(<ref refid="group__httpd__opts_1gaedd0fa3d356170d8ca3557acb410fd7c" kindref="member">LWIP_HTTPD_FILE_STATE</ref>)<sp/>&amp;&amp;<sp/><ref refid="group__httpd__opts_1gaedd0fa3d356170d8ca3557acb410fd7c" kindref="member">LWIP_HTTPD_FILE_STATE</ref></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection_state</highlight></codeline>
<codeline lineno="110"><highlight class="normal">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_FILE_STATE<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_CGI_SSI<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_CGI<sp/>||<sp/>LWIP_HTTPD_CGI_SSI<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_SSI</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="119"><highlight class="comment"><sp/>*<sp/>Function<sp/>pointer<sp/>for<sp/>the<sp/>SSI<sp/>tag<sp/>handler<sp/>callback.</highlight></codeline>
<codeline lineno="120"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="121"><highlight class="comment"><sp/>*<sp/>This<sp/>function<sp/>will<sp/>be<sp/>called<sp/>each<sp/>time<sp/>the<sp/>HTTPD<sp/>server<sp/>detects<sp/>a<sp/>tag<sp/>of<sp/>the</highlight></codeline>
<codeline lineno="122"><highlight class="comment"><sp/>*<sp/>form<sp/>&lt;!--#name--&gt;<sp/>in<sp/>a<sp/>.shtml,<sp/>.ssi<sp/>or<sp/>.shtm<sp/>file<sp/>where<sp/>&quot;name&quot;<sp/>appears<sp/>as</highlight></codeline>
<codeline lineno="123"><highlight class="comment"><sp/>*<sp/>one<sp/>of<sp/>the<sp/>tags<sp/>supplied<sp/>to<sp/>http_set_ssi_handler<sp/>in<sp/>the<sp/>ppcTags<sp/>array.<sp/><sp/>The</highlight></codeline>
<codeline lineno="124"><highlight class="comment"><sp/>*<sp/>returned<sp/>insert<sp/>string,<sp/>which<sp/>will<sp/>be<sp/>appended<sp/>after<sp/>the<sp/>the<sp/>string</highlight></codeline>
<codeline lineno="125"><highlight class="comment"><sp/>*<sp/>&quot;&lt;!--#name--&gt;&quot;<sp/>in<sp/>file<sp/>sent<sp/>back<sp/>to<sp/>the<sp/>client,should<sp/>be<sp/>written<sp/>to<sp/>pointer</highlight></codeline>
<codeline lineno="126"><highlight class="comment"><sp/>*<sp/>pcInsert.<sp/><sp/>iInsertLen<sp/>contains<sp/>the<sp/>size<sp/>of<sp/>the<sp/>buffer<sp/>pointed<sp/>to<sp/>by</highlight></codeline>
<codeline lineno="127"><highlight class="comment"><sp/>*<sp/>pcInsert.<sp/><sp/>The<sp/>iIndex<sp/>parameter<sp/>provides<sp/>the<sp/>zero-based<sp/>index<sp/>of<sp/>the<sp/>tag<sp/>as</highlight></codeline>
<codeline lineno="128"><highlight class="comment"><sp/>*<sp/>found<sp/>in<sp/>the<sp/>ppcTags<sp/>array<sp/>and<sp/>identifies<sp/>the<sp/>tag<sp/>that<sp/>is<sp/>to<sp/>be<sp/>processed.</highlight></codeline>
<codeline lineno="129"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="130"><highlight class="comment"><sp/>*<sp/>The<sp/>handler<sp/>returns<sp/>the<sp/>number<sp/>of<sp/>characters<sp/>written<sp/>to<sp/>pcInsert<sp/>excluding</highlight></codeline>
<codeline lineno="131"><highlight class="comment"><sp/>*<sp/>any<sp/>terminating<sp/>NULL<sp/>or<sp/>a<sp/>negative<sp/>number<sp/>to<sp/>indicate<sp/>a<sp/>failure<sp/>(tag<sp/>not</highlight></codeline>
<codeline lineno="132"><highlight class="comment"><sp/>*<sp/>recognized,<sp/>for<sp/>example).</highlight></codeline>
<codeline lineno="133"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="134"><highlight class="comment"><sp/>*<sp/>Note<sp/>that<sp/>the<sp/>behavior<sp/>of<sp/>this<sp/>SSI<sp/>mechanism<sp/>is<sp/>somewhat<sp/>different<sp/>from<sp/>the</highlight></codeline>
<codeline lineno="135"><highlight class="comment"><sp/>*<sp/>&quot;normal&quot;<sp/>SSI<sp/>processing<sp/>as<sp/>found<sp/>in,<sp/>for<sp/>example,<sp/>the<sp/>Apache<sp/>web<sp/>server.<sp/><sp/>In</highlight></codeline>
<codeline lineno="136"><highlight class="comment"><sp/>*<sp/>this<sp/>case,<sp/>the<sp/>inserted<sp/>text<sp/>is<sp/>appended<sp/>following<sp/>the<sp/>SSI<sp/>tag<sp/>rather<sp/>than</highlight></codeline>
<codeline lineno="137"><highlight class="comment"><sp/>*<sp/>replacing<sp/>the<sp/>tag<sp/>entirely.<sp/><sp/>This<sp/>allows<sp/>for<sp/>an<sp/>implementation<sp/>that<sp/>does<sp/>not</highlight></codeline>
<codeline lineno="138"><highlight class="comment"><sp/>*<sp/>require<sp/>significant<sp/>additional<sp/>buffering<sp/>of<sp/>output<sp/>data<sp/>yet<sp/>which<sp/>will<sp/>still</highlight></codeline>
<codeline lineno="139"><highlight class="comment"><sp/>*<sp/>offer<sp/>usable<sp/>SSI<sp/>functionality.<sp/><sp/>One<sp/>downside<sp/>to<sp/>this<sp/>approach<sp/>is<sp/>when</highlight></codeline>
<codeline lineno="140"><highlight class="comment"><sp/>*<sp/>attempting<sp/>to<sp/>use<sp/>SSI<sp/>within<sp/>JavaScript.<sp/><sp/>The<sp/>SSI<sp/>tag<sp/>is<sp/>structured<sp/>to</highlight></codeline>
<codeline lineno="141"><highlight class="comment"><sp/>*<sp/>resemble<sp/>an<sp/>HTML<sp/>comment<sp/>but<sp/>this<sp/>syntax<sp/>does<sp/>not<sp/>constitute<sp/>a<sp/>comment</highlight></codeline>
<codeline lineno="142"><highlight class="comment"><sp/>*<sp/>within<sp/>JavaScript<sp/>and,<sp/>hence,<sp/>leaving<sp/>the<sp/>tag<sp/>in<sp/>place<sp/>will<sp/>result<sp/>in</highlight></codeline>
<codeline lineno="143"><highlight class="comment"><sp/>*<sp/>problems<sp/>in<sp/>these<sp/>cases.<sp/><sp/>To<sp/>work<sp/>around<sp/>this,<sp/>any<sp/>SSI<sp/>tag<sp/>which<sp/>needs<sp/>to</highlight></codeline>
<codeline lineno="144"><highlight class="comment"><sp/>*<sp/>output<sp/>JavaScript<sp/>code<sp/>must<sp/>do<sp/>so<sp/>in<sp/>an<sp/>encapsulated<sp/>way,<sp/>sending<sp/>the<sp/>whole</highlight></codeline>
<codeline lineno="145"><highlight class="comment"><sp/>*<sp/>HTML<sp/>&lt;script&gt;...&lt;/script&gt;<sp/>section<sp/>as<sp/>a<sp/>single<sp/>include.</highlight></codeline>
<codeline lineno="146"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>(*tSSIHandler)(</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_SSI_RAW</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>ssi_tag_name,</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_SSI_RAW<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iIndex,</highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_SSI_RAW<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*pcInsert,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iInsertLen</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_SSI_MULTIPART</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>current_tag_part,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>*next_tag_part</highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_SSI_MULTIPART<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(LWIP_HTTPD_FILE_STATE)<sp/>&amp;&amp;<sp/>LWIP_HTTPD_FILE_STATE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection_state</highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_FILE_STATE<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>http_set_ssi_handler(tSSIHandler<sp/>pfnSSIHandler,</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>**ppcTags,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>iNumTags);</highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="preprocessor">#define<sp/>HTTPD_SSI_TAG_UNKNOWN<sp/>0xFFFF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_SSI<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_SUPPORT_POST</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>These<sp/>functions<sp/>must<sp/>be<sp/>implemented<sp/>by<sp/>the<sp/>application<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>httpd_post_begin(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*uri,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*http_request,</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>http_request_len,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>content_len,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*response_uri,</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>response_uri_len,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*post_auto_wnd);</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>httpd_post_receive_data(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>httpd_post_finished(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*response_uri,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>response_uri_len);</highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_HTTPD_POST_MANUAL_WND</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>httpd_post_data_recved(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*connection,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>recved_len);</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_POST_MANUAL_WND<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_SUPPORT_POST<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="httpd_8h_1ac364305cee969a0be43c071722b136e6" kindref="member">httpd_init</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="230"><highlight class="normal"></highlight></codeline>
<codeline lineno="231"><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal">}</highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HTTPD_H<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/include/net/apps/httpd.h"/>
  </compounddef>
</doxygen>
