wut/nsysnet_2socket_8h_source.html
2016-10-09 21:24:57 +01:00

299 lines
40 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>WUT: D:/Programming/Projects/wut/include/nsysnet/socket.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">WUT
&#160;<span id="projectnumber">0.1</span>
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_fe1e7b2a13642686c85dbce98656961b.html">nsysnet</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">socket.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="nsysnet_2socket_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="wut_8h.html">wut.h</a>&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;sys/time.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="sys_2socket_8h.html">sys/socket.h</a>&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga92d045f6ee2f343d6b28830a9fec082e"> 13</a></span>&#160;<span class="preprocessor">#define SOL_SOCKET 0xFFFF</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga51dba11ffc8e3b1bf695e721b3144094"> 15</a></span>&#160;<span class="preprocessor">#define PF_UNSPEC 0</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga3f5da0b5be27fe31ec7cc11bfa8d1a25"> 16</a></span>&#160;<span class="preprocessor">#define PF_INET 2</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga323f2649198fc7e64b19881869265618"> 17</a></span>&#160;<span class="preprocessor">#define PF_INET6 23</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gae77ae24b14b7b7f294f3e04121173f12"> 19</a></span>&#160;<span class="preprocessor">#define AF_UNSPEC PF_UNSPEC</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga9930604d0e32588eae76f43ca38e7826"> 20</a></span>&#160;<span class="preprocessor">#define AF_INET PF_INET</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gaa03706b2738b9a58d4985dfbe99e1bac"> 21</a></span>&#160;<span class="preprocessor">#define AF_INET6 PF_INET6</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga249394484f9410a2e3f8eba24657feb9"> 23</a></span>&#160;<span class="preprocessor">#define SOCK_STREAM 1</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga4db8b9a846c67404db0b6f014f9a9fdf"> 24</a></span>&#160;<span class="preprocessor">#define SOCK_DGRAM 2</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga99bc202592bac1adbd525f47b359b722"> 26</a></span>&#160;<span class="preprocessor">#define MSG_OOB 0x0001</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga60c35b1016d0d87fe1066ea817acad98"> 27</a></span>&#160;<span class="preprocessor">#define MSG_PEEK 0x0002</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gab18d3d439e4a9c8d0f73e7166e8eb376"> 28</a></span>&#160;<span class="preprocessor">#define MSG_DONTWAIT 0x0004</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga9643e949e179396230792b56fe7f6f06"> 29</a></span>&#160;<span class="preprocessor">#define MSG_DONTROUTE 0x0000 // ???</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga0c0fac4635e91ca9d839e20a09d3989e"> 30</a></span>&#160;<span class="preprocessor">#define MSG_WAITALL 0x0000 // ???</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga7b7c7e5e523ff0fc8823e7bff7665ead"> 31</a></span>&#160;<span class="preprocessor">#define MSG_MORE 0x0000 // ???</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga9f55d0e90dc8cc6b2287312435cdde48"> 32</a></span>&#160;<span class="preprocessor">#define MSG_NOSIGNAL 0x0000 // there are no signals</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gaf1c8cf84ac37451afaef3bde9976b6e1"> 34</a></span>&#160;<span class="preprocessor">#define SHUT_RD 0</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gaddb0a758e6fafdd89f5b7120f84738eb"> 35</a></span>&#160;<span class="preprocessor">#define SHUT_WR 1</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga80c54d1399557c97a0c81a319d08e9db"> 36</a></span>&#160;<span class="preprocessor">#define SHUT_RDWR 2</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment"> * SOL_SOCKET options</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga5589f74fada0d0cd47bd6ea8741a58ee"> 41</a></span>&#160;<span class="preprocessor">#define SO_REUSEADDR 0x0004 // reuse address</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga552d2cd8ffc1157c016299c5eba95b72"> 42</a></span>&#160;<span class="preprocessor">#define SO_LINGER 0x0080 // linger (no effect?)</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga1ab39f351679dd0e32436f0e6c9890d4"> 43</a></span>&#160;<span class="preprocessor">#define SO_OOBINLINE 0x0100 // out-of-band data inline (no effect?)</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gaf618cbb85161ff3196d3bcdf7565ba64"> 44</a></span>&#160;<span class="preprocessor">#define SO_SNDBUF 0x1001 // send buffer size</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga0db12e960ac303030400d9fd95391b52"> 45</a></span>&#160;<span class="preprocessor">#define SO_RCVBUF 0x1002 // receive buffer size</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga5b4707f0d55cfacf9cd25e5554975c8f"> 46</a></span>&#160;<span class="preprocessor">#define SO_SNDLOWAT 0x1003 // send low-water mark (no effect?)</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#gac750f0f8266f391654627fe3068f79c8"> 47</a></span>&#160;<span class="preprocessor">#define SO_RCVLOWAT 0x1004 // receive low-water mark</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga8ab1e00e94a92737d3a4b407f7fa90f1"> 48</a></span>&#160;<span class="preprocessor">#define SO_TYPE 0x1008 // get socket type</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga040d4fd00495232970a03425bc00e77a"> 49</a></span>&#160;<span class="preprocessor">#define SO_ERROR 0x1009 // get socket error</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb"> 51</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="group__nsysnet__socket.html#ga22bf2db06ebc5466014e637d419cef90"> 52</a></span>&#160;<span class="keyword">typedef</span> uint16_t <a class="code" href="group__nsysnet__socket.html#ga22bf2db06ebc5466014e637d419cef90">sa_family_t</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structsockaddr.html"> 54</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsockaddr.html">sockaddr</a></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;{</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structsockaddr.html#a36eaef69fff1193837626c2833ab507a"> 56</a></span>&#160; <a class="code" href="group__nsysnet__socket.html#ga22bf2db06ebc5466014e637d419cef90">sa_family_t</a> <a class="code" href="structsockaddr.html#a36eaef69fff1193837626c2833ab507a">sa_family</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structsockaddr.html#ab92ef26b74c80139475481ea0deb21a8"> 57</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="structsockaddr.html#ab92ef26b74c80139475481ea0deb21a8">sa_data</a>[];</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;};</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structsockaddr__storage.html"> 60</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsockaddr__storage.html">sockaddr_storage</a></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;{</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structsockaddr__storage.html#ae3ea34576030e8c0674c47de5bcaf9d5"> 62</a></span>&#160; <a class="code" href="group__nsysnet__socket.html#ga22bf2db06ebc5466014e637d419cef90">sa_family_t</a> <a class="code" href="structsockaddr__storage.html#ae3ea34576030e8c0674c47de5bcaf9d5">ss_family</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structsockaddr__storage.html#ae04dbb6e12baed1b6d44f3b7c1785cd8"> 63</a></span>&#160; <span class="keywordtype">char</span> <a class="code" href="structsockaddr__storage.html#ae04dbb6e12baed1b6d44f3b7c1785cd8">__ss_padding</a>[26];</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;};</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structlinger.html"> 66</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structlinger.html">linger</a></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;{</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structlinger.html#a53f550a39f9923b9dbc6a67adc423cc0"> 68</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="structlinger.html#a53f550a39f9923b9dbc6a67adc423cc0">l_onoff</a>;</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structlinger.html#a86a5f304dfcd62d626f27bbd3796683d"> 69</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="structlinger.html#a86a5f304dfcd62d626f27bbd3796683d">l_linger</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;};</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<a class="code" href="group__nsysnet__socket.html#gaa6779bbd3ee86fec7811f4ab4b916954">socket_lib_init</a>();</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga7937a1ce0c865387d092f8440f7ef5bd">accept</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *addr,</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> *addrlen);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga82199bcd81894331533a25f08e172480">bind</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *addr,</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> addrlen);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<a class="code" href="group__nsysnet__socket.html#gafb914106562ca7c54f19afc4f01b0bb8">closesocket</a>(<span class="keywordtype">int</span> sockfd);</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<a class="code" href="group__nsysnet__socket.html#gacdfd99b6c59c833776412fbb0c539efb">connect</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *addr,</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> addrlen);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<a class="code" href="group__nsysnet__socket.html#gad56bbd2dab72a7d4062e62bd0b129435">getpeername</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *addr,</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> *addrlen);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga7895af1011e7b9ff128eda29e773a84e">getsockname</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *addr,</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> *addrlen);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<a class="code" href="group__nsysnet__socket.html#gab81d992040a0b29b4f9fd20a263ab1d0">getsockopt</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">int</span> level,</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordtype">int</span> optname,</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordtype">void</span> *optval,</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> *optlen);</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga5989c21d05cb17caba26cef496a7beea">listen</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordtype">int</span> backlog);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;ssize_t</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga49c565342c0f29cec5461ec22c3b1b3d">recv</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordtype">void</span> *buf,</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;ssize_t</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<a class="code" href="group__nsysnet__socket.html#gad144bb8d4119d5fa0ee5b6c4d06bc645">recvfrom</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordtype">void</span> *buf,</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">int</span> flags,</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *src_addr,</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> *addrlen);</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;ssize_t</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<a class="code" href="group__nsysnet__socket.html#gabe712ada38e96543e13ee5ec42c0849f">send</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keyword">const</span> <span class="keywordtype">void</span> *buf,</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;ssize_t</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<a class="code" href="group__nsysnet__socket.html#gaa481d86e1f7cfb428547c552eee05511">sendto</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keyword">const</span> <span class="keywordtype">void</span> *buf,</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordtype">int</span> flags,</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structsockaddr.html">sockaddr</a> *dest_addr,</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> addrlen);</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<a class="code" href="group__nsysnet__socket.html#gaf188b4433461a4224c209231689e8270">setsockopt</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordtype">int</span> level,</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordtype">int</span> optname,</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keyword">const</span> <span class="keywordtype">void</span> *optval,</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <a class="code" href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a> optlen);</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<a class="code" href="group__nsysnet__socket.html#ga402425b8e1ceab40ac38a949babcf1aa">shutdown</a>(<span class="keywordtype">int</span> sockfd,</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">int</span> how);</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<a class="code" href="group__nsysnet__socket.html#gaf4e0711877c45a41168ac677b0670ccd">socket</a>(<span class="keywordtype">int</span> domain,</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordtype">int</span> type,</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordtype">int</span> protocol);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;<span class="keywordtype">int</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<a class="code" href="group__nsysnet__socket.html#gadd056a205aa6181762de87c1d8c9a210">select</a>(<span class="keywordtype">int</span> nfds,</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; fd_set *readfds,</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; fd_set *writefds,</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; fd_set *exceptfds,</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keyword">struct</span> timeval *timeout);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;}</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;</div>
<div class="ttc" id="group__nsysnet__socket_html_ga5989c21d05cb17caba26cef496a7beea"><div class="ttname"><a href="group__nsysnet__socket.html#ga5989c21d05cb17caba26cef496a7beea">listen</a></div><div class="ttdeci">int listen(int sockfd, int backlog)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga49c565342c0f29cec5461ec22c3b1b3d"><div class="ttname"><a href="group__nsysnet__socket.html#ga49c565342c0f29cec5461ec22c3b1b3d">recv</a></div><div class="ttdeci">ssize_t recv(int sockfd, void *buf, size_t len, int flags)</div></div>
<div class="ttc" id="sys_2socket_8h_html"><div class="ttname"><a href="sys_2socket_8h.html">socket.h</a></div></div>
<div class="ttc" id="structsockaddr__storage_html_ae3ea34576030e8c0674c47de5bcaf9d5"><div class="ttname"><a href="structsockaddr__storage.html#ae3ea34576030e8c0674c47de5bcaf9d5">sockaddr_storage::ss_family</a></div><div class="ttdeci">sa_family_t ss_family</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00062">socket.h:62</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga7895af1011e7b9ff128eda29e773a84e"><div class="ttname"><a href="group__nsysnet__socket.html#ga7895af1011e7b9ff128eda29e773a84e">getsockname</a></div><div class="ttdeci">int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen)</div></div>
<div class="ttc" id="structsockaddr__storage_html_ae04dbb6e12baed1b6d44f3b7c1785cd8"><div class="ttname"><a href="structsockaddr__storage.html#ae04dbb6e12baed1b6d44f3b7c1785cd8">sockaddr_storage::__ss_padding</a></div><div class="ttdeci">char __ss_padding[26]</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00063">socket.h:63</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga82199bcd81894331533a25f08e172480"><div class="ttname"><a href="group__nsysnet__socket.html#ga82199bcd81894331533a25f08e172480">bind</a></div><div class="ttdeci">int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga22bf2db06ebc5466014e637d419cef90"><div class="ttname"><a href="group__nsysnet__socket.html#ga22bf2db06ebc5466014e637d419cef90">sa_family_t</a></div><div class="ttdeci">uint16_t sa_family_t</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00052">socket.h:52</a></div></div>
<div class="ttc" id="structlinger_html_a86a5f304dfcd62d626f27bbd3796683d"><div class="ttname"><a href="structlinger.html#a86a5f304dfcd62d626f27bbd3796683d">linger::l_linger</a></div><div class="ttdeci">int l_linger</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00069">socket.h:69</a></div></div>
<div class="ttc" id="structsockaddr_html"><div class="ttname"><a href="structsockaddr.html">sockaddr</a></div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00054">socket.h:54</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_gaf4e0711877c45a41168ac677b0670ccd"><div class="ttname"><a href="group__nsysnet__socket.html#gaf4e0711877c45a41168ac677b0670ccd">socket</a></div><div class="ttdeci">int socket(int domain, int type, int protocol)</div></div>
<div class="ttc" id="structlinger_html"><div class="ttname"><a href="structlinger.html">linger</a></div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00066">socket.h:66</a></div></div>
<div class="ttc" id="structlinger_html_a53f550a39f9923b9dbc6a67adc423cc0"><div class="ttname"><a href="structlinger.html#a53f550a39f9923b9dbc6a67adc423cc0">linger::l_onoff</a></div><div class="ttdeci">int l_onoff</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00068">socket.h:68</a></div></div>
<div class="ttc" id="wut_8h_html"><div class="ttname"><a href="wut_8h.html">wut.h</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_gaa6779bbd3ee86fec7811f4ab4b916954"><div class="ttname"><a href="group__nsysnet__socket.html#gaa6779bbd3ee86fec7811f4ab4b916954">socket_lib_init</a></div><div class="ttdeci">void socket_lib_init()</div></div>
<div class="ttc" id="structsockaddr__storage_html"><div class="ttname"><a href="structsockaddr__storage.html">sockaddr_storage</a></div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00060">socket.h:60</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_gaf188b4433461a4224c209231689e8270"><div class="ttname"><a href="group__nsysnet__socket.html#gaf188b4433461a4224c209231689e8270">setsockopt</a></div><div class="ttdeci">int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gad56bbd2dab72a7d4062e62bd0b129435"><div class="ttname"><a href="group__nsysnet__socket.html#gad56bbd2dab72a7d4062e62bd0b129435">getpeername</a></div><div class="ttdeci">int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga7937a1ce0c865387d092f8440f7ef5bd"><div class="ttname"><a href="group__nsysnet__socket.html#ga7937a1ce0c865387d092f8440f7ef5bd">accept</a></div><div class="ttdeci">int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gabe712ada38e96543e13ee5ec42c0849f"><div class="ttname"><a href="group__nsysnet__socket.html#gabe712ada38e96543e13ee5ec42c0849f">send</a></div><div class="ttdeci">ssize_t send(int sockfd, const void *buf, size_t len, int flags)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gaa481d86e1f7cfb428547c552eee05511"><div class="ttname"><a href="group__nsysnet__socket.html#gaa481d86e1f7cfb428547c552eee05511">sendto</a></div><div class="ttdeci">ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gab81d992040a0b29b4f9fd20a263ab1d0"><div class="ttname"><a href="group__nsysnet__socket.html#gab81d992040a0b29b4f9fd20a263ab1d0">getsockopt</a></div><div class="ttdeci">int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)</div></div>
<div class="ttc" id="structsockaddr_html_ab92ef26b74c80139475481ea0deb21a8"><div class="ttname"><a href="structsockaddr.html#ab92ef26b74c80139475481ea0deb21a8">sockaddr::sa_data</a></div><div class="ttdeci">char sa_data[]</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00057">socket.h:57</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_gad144bb8d4119d5fa0ee5b6c4d06bc645"><div class="ttname"><a href="group__nsysnet__socket.html#gad144bb8d4119d5fa0ee5b6c4d06bc645">recvfrom</a></div><div class="ttdeci">ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)</div></div>
<div class="ttc" id="structsockaddr_html_a36eaef69fff1193837626c2833ab507a"><div class="ttname"><a href="structsockaddr.html#a36eaef69fff1193837626c2833ab507a">sockaddr::sa_family</a></div><div class="ttdeci">sa_family_t sa_family</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00056">socket.h:56</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga3f5f480bed01f54df564b99350f1d1bb"><div class="ttname"><a href="group__nsysnet__socket.html#ga3f5f480bed01f54df564b99350f1d1bb">socklen_t</a></div><div class="ttdeci">uint32_t socklen_t</div><div class="ttdef"><b>Definition:</b> <a href="nsysnet_2socket_8h_source.html#l00051">socket.h:51</a></div></div>
<div class="ttc" id="group__nsysnet__socket_html_gafb914106562ca7c54f19afc4f01b0bb8"><div class="ttname"><a href="group__nsysnet__socket.html#gafb914106562ca7c54f19afc4f01b0bb8">closesocket</a></div><div class="ttdeci">int closesocket(int sockfd)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gadd056a205aa6181762de87c1d8c9a210"><div class="ttname"><a href="group__nsysnet__socket.html#gadd056a205aa6181762de87c1d8c9a210">select</a></div><div class="ttdeci">int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_gacdfd99b6c59c833776412fbb0c539efb"><div class="ttname"><a href="group__nsysnet__socket.html#gacdfd99b6c59c833776412fbb0c539efb">connect</a></div><div class="ttdeci">int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)</div></div>
<div class="ttc" id="group__nsysnet__socket_html_ga402425b8e1ceab40ac38a949babcf1aa"><div class="ttname"><a href="group__nsysnet__socket.html#ga402425b8e1ceab40ac38a949babcf1aa">shutdown</a></div><div class="ttdeci">int shutdown(int sockfd, int how)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>