Newer
Older
ubixos / doc / doxygen / html / udp_8h.html
@reddawg reddawg on 18 Jun 2004 18 KB UbixOS PreRelease
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ubixos: udp.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<h1>udp.h File Reference</h1><code>#include "<a class="el" href="arch_8h-source.html">net/arch.h</a>"</code><br>
<code>#include "<a class="el" href="pbuf_8h-source.html">net/pbuf.h</a>"</code><br>
<code>#include "<a class="el" href="ipv4_2inet_8h-source.html">net/ipv4/inet.h</a>"</code><br>
<code>#include "<a class="el" href="ipv4_2ip_8h-source.html">net/ipv4/ip.h</a>"</code><br>
<code>#include "<a class="el" href="err_8h-source.html">net/err.h</a>"</code><br>

<p>
<a href="udp_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structudp__hdr.html">udp_hdr</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="structudp__pcb.html">udp_pcb</a></td></tr>

<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a0">UDP_HLEN</a>&nbsp;&nbsp;&nbsp;8</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a1">UDP_FLAGS_NOCHKSUM</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a2">UDP_FLAGS_UDPLITE</a>&nbsp;&nbsp;&nbsp;0x02</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a3">udp_flags</a>(pcb)&nbsp;&nbsp;&nbsp;((pcb)-&gt;flags)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a4">udp_setflags</a>(pcb, f)&nbsp;&nbsp;&nbsp;((pcb)-&gt;flags = (f))</td></tr>

<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a6">udp_new</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a7">udp_remove</a> (struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *pcb)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="err_8h.html#a12">err_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a8">udp_bind</a> (struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *pcb, struct <a class="el" href="structip__addr.html">ip_addr</a> *ipaddr, <a class="el" href="types_8h.html#a2">uInt16</a> port)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="err_8h.html#a12">err_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a9">udp_connect</a> (struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *pcb, struct <a class="el" href="structip__addr.html">ip_addr</a> *ipaddr, <a class="el" href="types_8h.html#a2">uInt16</a> port)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a10">udp_recv</a> (struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *pcb, void(*recv)(void *arg, struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *upcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, struct <a class="el" href="structip__addr.html">ip_addr</a> *addr, <a class="el" href="types_8h.html#a2">uInt16</a> port), void *recv_arg)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="err_8h.html#a12">err_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a11">udp_send</a> (struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *pcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="types_8h.html#a1">uInt8</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a12">udp_lookup</a> (struct <a class="el" href="structip__hdr.html">ip_hdr</a> *iphdr, struct <a class="el" href="structnetif.html">netif</a> *inp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a13">udp_input</a> (struct <a class="el" href="structpbuf.html">pbuf</a> *p, struct <a class="el" href="structnetif.html">netif</a> *inp)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a14">udp_init</a> (void)</td></tr>

<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structudp__hdr.html">udp_hdr</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="udp_8h.html#a5">PACK_STRUCT_STRUCT</a></td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a name="a3" doxytag="udp.h::udp_flags"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define udp_flags</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">pcb&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;((pcb)-&gt;flags)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a1" doxytag="udp.h::UDP_FLAGS_NOCHKSUM"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define UDP_FLAGS_NOCHKSUM&nbsp;&nbsp;&nbsp;0x01
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a2" doxytag="udp.h::UDP_FLAGS_UDPLITE"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define UDP_FLAGS_UDPLITE&nbsp;&nbsp;&nbsp;0x02
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a0" doxytag="udp.h::UDP_HLEN"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define UDP_HLEN&nbsp;&nbsp;&nbsp;8
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a4" doxytag="udp.h::udp_setflags"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define udp_setflags</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">pcb,         <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>f&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;((pcb)-&gt;flags = (f))
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a8" doxytag="udp.h::udp_bind"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="err_8h.html#a12">err_t</a> udp_bind </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pcb</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>struct <a class="el" href="structip__addr.html">ip_addr</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ipaddr</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="types_8h.html#a2">uInt16</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>port</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a9" doxytag="udp.h::udp_connect"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="err_8h.html#a12">err_t</a> udp_connect </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pcb</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>struct <a class="el" href="structip__addr.html">ip_addr</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ipaddr</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="types_8h.html#a2">uInt16</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>port</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a14" doxytag="udp.h::udp_init"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void udp_init </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a13" doxytag="udp.h::udp_input"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void udp_input </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structpbuf.html">pbuf</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>inp</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a12" doxytag="udp.h::udp_lookup"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="types_8h.html#a1">uInt8</a> udp_lookup </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structip__hdr.html">ip_hdr</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iphdr</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>inp</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a6" doxytag="udp.h::udp_new"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> struct <a class="el" href="structudp__pcb.html">udp_pcb</a>* udp_new </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a10" doxytag="udp.h::udp_recv"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void udp_recv </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pcb</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void(*&nbsp;</td>
          <td class="mdname" nowrap> <em>recv</em>)(void *arg, struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *upcb, struct <a class="el" href="structpbuf.html">pbuf</a> *p, struct <a class="el" href="structip__addr.html">ip_addr</a> *addr, <a class="el" href="types_8h.html#a2">uInt16</a> port), </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>recv_arg</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a7" doxytag="udp.h::udp_remove"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void udp_remove </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pcb</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="a11" doxytag="udp.h::udp_send"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="err_8h.html#a12">err_t</a> udp_send </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">struct <a class="el" href="structudp__pcb.html">udp_pcb</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pcb</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>struct <a class="el" href="structpbuf.html">pbuf</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a name="a5" doxytag="udp.h::PACK_STRUCT_STRUCT"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> struct <a class="el" href="structudp__hdr.html">udp_hdr</a>  <a class="el" href="arp_8h.html#a3">PACK_STRUCT_STRUCT</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sat May 8 09:28:23 2004 for Ubixos by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>