<?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="tftp__server_8h" kind="file" language="C++"> <compoundname>tftp_server.h</compoundname> <includes local="yes">lwip/apps/tftp_opts.h</includes> <includes local="yes">lwip/err.h</includes> <includes local="yes">lwip/pbuf.h</includes> <incdepgraph> <node id="2"> <label>lwip/apps/tftp_opts.h</label> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/include/net/apps/tftp_server.h</label> <link refid="tftp__server_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="3" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> </node> <node id="3"> <label>lwip/err.h</label> </node> <node id="4"> <label>lwip/pbuf.h</label> </node> </incdepgraph> <innerclass refid="structtftp__context" prot="public">tftp_context</innerclass> <sectiondef kind="func"> <memberdef kind="function" id="tftp__server_8h_1a7a80673a1324da5c8ae2440af7b008a3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tftp_init</definition> <argsstring>(const struct tftp_context *ctx)</argsstring> <name>tftp_init</name> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structtftp__context" kindref="compound">tftp_context</ref> *</type> <declname>ctx</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/apps/tftp_server.h" line="88" column="7" declfile="C:/Dev/git/UbixOS/sys/include/net/apps/tftp_server.h" declline="88" declcolumn="7"/> </memberdef> </sectiondef> <briefdescription> <para>Trivial File Transfer Protocol (RFC 1350) </para> </briefdescription> <detaileddescription> <para><simplesect kind="author"><para>Logan Gunthorpe <ulink url="mailto:logang@deltatee.com">logang@deltatee.com</ulink></para> </simplesect> Copyright (c) Deltatee Enterprises Ltd. 2013 All rights reserved. </para> </detaileddescription> <programlisting> <codeline lineno="1"><highlight class="comment">/****************************************************************/</highlight></codeline> <codeline lineno="14"><highlight class="comment">/*<sp/></highlight></codeline> <codeline lineno="15"><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</highlight></codeline> <codeline lineno="16"><highlight class="comment"><sp/>*<sp/>modification,are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline> <codeline lineno="17"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="18"><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="19"><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="20"><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="21"><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="22"><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="23"><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="24"><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="25"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="26"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS''<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline> <codeline lineno="27"><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="28"><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</highlight></codeline> <codeline lineno="29"><highlight class="comment"><sp/>*<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,</highlight></codeline> <codeline lineno="30"><highlight class="comment"><sp/>*<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED</highlight></codeline> <codeline lineno="31"><highlight class="comment"><sp/>*<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR</highlight></codeline> <codeline lineno="32"><highlight class="comment"><sp/>*<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF</highlight></codeline> <codeline lineno="33"><highlight class="comment"><sp/>*<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING</highlight></codeline> <codeline lineno="34"><highlight class="comment"><sp/>*<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS</highlight></codeline> <codeline lineno="35"><highlight class="comment"><sp/>*<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline> <codeline lineno="36"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="37"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Logan<sp/>Gunthorpe<sp/><logang@deltatee.com></highlight></codeline> <codeline lineno="38"><highlight class="comment"><sp/>*</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_TFTP_SERVER_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_HDR_APPS_TFTP_SERVER_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/>"lwip/apps/tftp_opts.h"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"lwip/err.h"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"lwip/pbuf.h"</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">"C"</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="55" refid="structtftp__context" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtftp__context" kindref="compound">tftp_context</ref><sp/>{</highlight></codeline> <codeline lineno="63" refid="structtftp__context_1ae70d64e8e20328cc492d766506df4cba" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>(*open)(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fname,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>mode,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/><ref refid="structtftp__context_1a9e6e4ec803ec9597822923369701754d" kindref="member">write</ref>);</highlight></codeline> <codeline lineno="68" refid="structtftp__context_1ae9181c57d1cf89bc263f7671e5630a65" refkind="member"><highlight class="normal"><sp/><sp/>void<sp/>(*<ref refid="structtftp__context_1ae9181c57d1cf89bc263f7671e5630a65" kindref="member">close</ref>)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>handle);</highlight></codeline> <codeline lineno="76" refid="structtftp__context_1a748e37df0c8b84b3adda78d603b9033c" refkind="member"><highlight class="normal"><sp/><sp/>int<sp/>(*<ref refid="structtftp__context_1a748e37df0c8b84b3adda78d603b9033c" kindref="member">read</ref>)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>handle,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/><ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes);</highlight></codeline> <codeline lineno="85" refid="structtftp__context_1a9e6e4ec803ec9597822923369701754d" refkind="member"><highlight class="normal"><sp/><sp/>int<sp/>(*<ref refid="structtftp__context_1a9e6e4ec803ec9597822923369701754d" kindref="member">write</ref>)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>handle,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref>*<sp/>p);</highlight></codeline> <codeline lineno="86"><highlight class="normal">};</highlight></codeline> <codeline lineno="87"><highlight class="normal"></highlight></codeline> <codeline lineno="88"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tftp__server_8h_1a7a80673a1324da5c8ae2440af7b008a3" kindref="member">tftp_init</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtftp__context" kindref="compound">tftp_context</ref>*<sp/>ctx);</highlight></codeline> <codeline lineno="89"><highlight class="normal"></highlight></codeline> <codeline lineno="90"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="91"><highlight class="normal">}</highlight></codeline> <codeline lineno="92"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"></highlight></codeline> <codeline lineno="94"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HDR_APPS_TFTP_SERVER_H<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/include/net/apps/tftp_server.h"/> </compounddef> </doxygen>