1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"Content-Type" content=
"text/xhtml;charset=UTF-8"/>
5 <meta http-equiv=
"X-UA-Compatible" content=
"IE=9"/>
6 <title>Xenomai API: include/posix/sys/socket.h Source File
</title>
7 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css"/>
8 <script type=
"text/javascript" src=
"jquery.js"></script>
9 <script type=
"text/javascript" src=
"dynsections.js"></script>
10 <link href=
"navtree.css" rel=
"stylesheet" type=
"text/css"/>
11 <script type=
"text/javascript" src=
"resize.js"></script>
12 <script type=
"text/javascript" src=
"navtree.js"></script>
13 <script type=
"text/javascript">
14 $(document
).ready(initResizable
);
16 <link href=
"search/search.css" rel=
"stylesheet" type=
"text/css"/>
17 <script type=
"text/javascript" src=
"search/search.js"></script>
18 <script type=
"text/javascript">
19 $(document
).ready(function() {
20 if ($('.searchresults').length
> 0) { searchBox
.DOMSearchField().focus(); }
23 <link rel=
"search" href=
"search-opensearch.php?v=opensearch.xml" type=
"application/opensearchdescription+xml" title=
"Xenomai API"/>
24 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css" />
27 <div id=
"top"><!-- do not remove this div, it is closed by doxygen! -->
29 <table cellspacing=
"0" cellpadding=
"0">
31 <tr style=
"height: 56px;">
32 <td style=
"padding-left: 0.5em;">
33 <div id=
"projectname">Xenomai API
34  <span id=
"projectnumber">2.6.3</span>
41 <!-- end header part -->
42 <!-- Generated by Doxygen 1.8.1.2 -->
43 <script type=
"text/javascript">
44 var searchBox
= new SearchBox("searchBox", "search",false,'Search');
46 <div id=
"navrow1" class=
"tabs">
48 <li><a href=
"index.html"><span>Main
 Page
</span></a></li>
49 <li><a href=
"pages.html"><span>Related
 Pages
</span></a></li>
50 <li><a href=
"modules.html"><span>Modules
</span></a></li>
51 <li><a href=
"annotated.html"><span>Data
 Structures
</span></a></li>
52 <li class=
"current"><a href=
"files.html"><span>Files
</span></a></li>
53 <li><a href=
"examples.html"><span>Examples
</span></a></li>
55 <div id=
"MSearchBox" class=
"MSearchBoxInactive">
57 <form id=
"FSearchBox" action=
"search.php" method=
"get">
58 <img id=
"MSearchSelect" src=
"search/mag.png" alt=
""/>
59 <input type=
"text" id=
"MSearchField" name=
"query" value=
"Search" size=
"20" accesskey=
"S"
60 onfocus=
"searchBox.OnSearchFieldFocus(true)"
61 onblur=
"searchBox.OnSearchFieldFocus(false)"/>
63 </div><div class=
"right"></div>
68 <div id=
"navrow2" class=
"tabs2">
70 <li><a href=
"files.html"><span>File
 List
</span></a></li>
71 <li><a href=
"globals.html"><span>Globals
</span></a></li>
75 <div id=
"side-nav" class=
"ui-resizable side-nav-resizable">
77 <div id=
"nav-tree-contents">
78 <div id=
"nav-sync" class=
"sync"></div>
81 <div id=
"splitbar" style=
"-moz-user-select:none;"
82 class=
"ui-resizable-handle">
85 <script type=
"text/javascript">
86 $(document
).ready(function(){initNavTree('socket_8h_source.html','');});
88 <div id=
"doc-content">
90 <div class=
"headertitle">
91 <div class=
"title">socket.h
</div> </div>
93 <div class=
"contents">
94 <div class=
"fragment"><div class=
"line"><a name=
"l00001"></a><span class=
"lineno"> 1</span> <span class=
"comment">/*
</span></div>
95 <div class=
"line"><a name=
"l00002"></a><span class=
"lineno"> 2</span> <span class=
"comment"> * Copyright (C)
2005 Philippe Gerum
<rpm@xenomai.org
>.
</span></div>
96 <div class=
"line"><a name=
"l00003"></a><span class=
"lineno"> 3</span> <span class=
"comment"> *
</span></div>
97 <div class=
"line"><a name=
"l00004"></a><span class=
"lineno"> 4</span> <span class=
"comment"> * This program is free software; you can redistribute it and/or
</span></div>
98 <div class=
"line"><a name=
"l00005"></a><span class=
"lineno"> 5</span> <span class=
"comment"> * modify it under the terms of the GNU General Public License as
</span></div>
99 <div class=
"line"><a name=
"l00006"></a><span class=
"lineno"> 6</span> <span class=
"comment"> * published by the Free Software Foundation; either version
2 of the
</span></div>
100 <div class=
"line"><a name=
"l00007"></a><span class=
"lineno"> 7</span> <span class=
"comment"> * License, or (at your option) any later version.
</span></div>
101 <div class=
"line"><a name=
"l00008"></a><span class=
"lineno"> 8</span> <span class=
"comment"> *
</span></div>
102 <div class=
"line"><a name=
"l00009"></a><span class=
"lineno"> 9</span> <span class=
"comment"> * This program is distributed in the hope that it will be useful,
</span></div>
103 <div class=
"line"><a name=
"l00010"></a><span class=
"lineno"> 10</span> <span class=
"comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of
</span></div>
104 <div class=
"line"><a name=
"l00011"></a><span class=
"lineno"> 11</span> <span class=
"comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
</span></div>
105 <div class=
"line"><a name=
"l00012"></a><span class=
"lineno"> 12</span> <span class=
"comment"> * GNU General Public License for more details.
</span></div>
106 <div class=
"line"><a name=
"l00013"></a><span class=
"lineno"> 13</span> <span class=
"comment"> *
</span></div>
107 <div class=
"line"><a name=
"l00014"></a><span class=
"lineno"> 14</span> <span class=
"comment"> * You should have received a copy of the GNU General Public License
</span></div>
108 <div class=
"line"><a name=
"l00015"></a><span class=
"lineno"> 15</span> <span class=
"comment"> * along with this program; if not, write to the Free Software
</span></div>
109 <div class=
"line"><a name=
"l00016"></a><span class=
"lineno"> 16</span> <span class=
"comment"> * Foundation, Inc.,
59 Temple Place - Suite
330, Boston, MA
02111-
1307, USA.
</span></div>
110 <div class=
"line"><a name=
"l00017"></a><span class=
"lineno"> 17</span> <span class=
"comment"> */
</span></div>
111 <div class=
"line"><a name=
"l00018"></a><span class=
"lineno"> 18</span> </div>
112 <div class=
"line"><a name=
"l00019"></a><span class=
"lineno"> 19</span> <span class=
"preprocessor">#ifndef _XENO_POSIX_SOCKET_H
</span></div>
113 <div class=
"line"><a name=
"l00020"></a><span class=
"lineno"> 20</span> <span class=
"preprocessor"></span><span class=
"preprocessor">#define _XENO_POSIX_SOCKET_H
</span></div>
114 <div class=
"line"><a name=
"l00021"></a><span class=
"lineno"> 21</span> <span class=
"preprocessor"></span></div>
115 <div class=
"line"><a name=
"l00022"></a><span class=
"lineno"> 22</span> <span class=
"preprocessor">#if !(defined(__KERNEL__) || defined(__XENO_SIM__))
</span></div>
116 <div class=
"line"><a name=
"l00023"></a><span class=
"lineno"> 23</span> <span class=
"preprocessor"></span></div>
117 <div class=
"line"><a name=
"l00024"></a><span class=
"lineno"> 24</span> <span class=
"preprocessor">#pragma GCC system_header
</span></div>
118 <div class=
"line"><a name=
"l00025"></a><span class=
"lineno"> 25</span> <span class=
"preprocessor"></span></div>
119 <div class=
"line"><a name=
"l00026"></a><span class=
"lineno"> 26</span> <span class=
"preprocessor">#include_next
<sys/socket.h
></span></div>
120 <div class=
"line"><a name=
"l00027"></a><span class=
"lineno"> 27</span> <span class=
"preprocessor"></span></div>
121 <div class=
"line"><a name=
"l00028"></a><span class=
"lineno"> 28</span> <span class=
"preprocessor">#ifdef __cplusplus
</span></div>
122 <div class=
"line"><a name=
"l00029"></a><span class=
"lineno"> 29</span> <span class=
"preprocessor"></span><span class=
"keyword">extern
</span> <span class=
"stringliteral">"C
"</span> {
</div>
123 <div class=
"line"><a name=
"l00030"></a><span class=
"lineno"> 30</span> <span class=
"preprocessor">#endif
</span></div>
124 <div class=
"line"><a name=
"l00031"></a><span class=
"lineno"> 31</span> <span class=
"preprocessor"></span></div>
125 <div class=
"line"><a name=
"l00032"></a><span class=
"lineno"> 32</span> <span class=
"keywordtype">int
</span> __real_socket(
<span class=
"keywordtype">int
</span> protocol_family,
<span class=
"keywordtype">int
</span> socket_type,
<span class=
"keywordtype">int
</span> protocol);
</div>
126 <div class=
"line"><a name=
"l00033"></a><span class=
"lineno"> 33</span> </div>
127 <div class=
"line"><a name=
"l00034"></a><span class=
"lineno"> 34</span> ssize_t __real_recvmsg(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">struct
</span> msghdr *msg,
<span class=
"keywordtype">int
</span> flags);
</div>
128 <div class=
"line"><a name=
"l00035"></a><span class=
"lineno"> 35</span> </div>
129 <div class=
"line"><a name=
"l00036"></a><span class=
"lineno"> 36</span> ssize_t __real_sendmsg(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> msghdr *msg,
<span class=
"keywordtype">int
</span> flags);
</div>
130 <div class=
"line"><a name=
"l00037"></a><span class=
"lineno"> 37</span> </div>
131 <div class=
"line"><a name=
"l00038"></a><span class=
"lineno"> 38</span> ssize_t __real_recvfrom(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">void
</span> *buf,
<span class=
"keywordtype">size_t
</span> len,
<span class=
"keywordtype">int
</span> flags,
</div>
132 <div class=
"line"><a name=
"l00039"></a><span class=
"lineno"> 39</span>  <span class=
"keyword">struct
</span> sockaddr *from, socklen_t *fromlen);
</div>
133 <div class=
"line"><a name=
"l00040"></a><span class=
"lineno"> 40</span> </div>
134 <div class=
"line"><a name=
"l00041"></a><span class=
"lineno"> 41</span> ssize_t __real_sendto(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">const
</span> <span class=
"keywordtype">void
</span> *buf,
<span class=
"keywordtype">size_t
</span> len,
<span class=
"keywordtype">int
</span> flags,
</div>
135 <div class=
"line"><a name=
"l00042"></a><span class=
"lineno"> 42</span>  <span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> sockaddr *to, socklen_t tolen);
</div>
136 <div class=
"line"><a name=
"l00043"></a><span class=
"lineno"> 43</span> </div>
137 <div class=
"line"><a name=
"l00044"></a><span class=
"lineno"> 44</span> ssize_t __real_recv(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">void
</span> *buf,
<span class=
"keywordtype">size_t
</span> len,
<span class=
"keywordtype">int
</span> flags);
</div>
138 <div class=
"line"><a name=
"l00045"></a><span class=
"lineno"> 45</span> </div>
139 <div class=
"line"><a name=
"l00046"></a><span class=
"lineno"> 46</span> ssize_t __real_send(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">const
</span> <span class=
"keywordtype">void
</span> *buf,
<span class=
"keywordtype">size_t
</span> len,
<span class=
"keywordtype">int
</span> flags);
</div>
140 <div class=
"line"><a name=
"l00047"></a><span class=
"lineno"> 47</span> </div>
141 <div class=
"line"><a name=
"l00048"></a><span class=
"lineno"> 48</span> <span class=
"keywordtype">int
</span> __real_getsockopt(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">int
</span> level,
<span class=
"keywordtype">int
</span> optname,
<span class=
"keywordtype">void
</span> *optval,
</div>
142 <div class=
"line"><a name=
"l00049"></a><span class=
"lineno"> 49</span>  socklen_t *optlen);
</div>
143 <div class=
"line"><a name=
"l00050"></a><span class=
"lineno"> 50</span> </div>
144 <div class=
"line"><a name=
"l00051"></a><span class=
"lineno"> 51</span> <span class=
"keywordtype">int
</span> __real_setsockopt(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">int
</span> level,
<span class=
"keywordtype">int
</span> optname,
<span class=
"keyword">const
</span> <span class=
"keywordtype">void
</span> *optval,
</div>
145 <div class=
"line"><a name=
"l00052"></a><span class=
"lineno"> 52</span>  socklen_t optlen);
</div>
146 <div class=
"line"><a name=
"l00053"></a><span class=
"lineno"> 53</span> </div>
147 <div class=
"line"><a name=
"l00054"></a><span class=
"lineno"> 54</span> <span class=
"keywordtype">int
</span> __real_bind(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> sockaddr *my_addr, socklen_t addrlen);
</div>
148 <div class=
"line"><a name=
"l00055"></a><span class=
"lineno"> 55</span> </div>
149 <div class=
"line"><a name=
"l00056"></a><span class=
"lineno"> 56</span> <span class=
"keywordtype">int
</span> __real_connect(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> sockaddr *serv_addr,
</div>
150 <div class=
"line"><a name=
"l00057"></a><span class=
"lineno"> 57</span>  socklen_t addrlen);
</div>
151 <div class=
"line"><a name=
"l00058"></a><span class=
"lineno"> 58</span> </div>
152 <div class=
"line"><a name=
"l00059"></a><span class=
"lineno"> 59</span> <span class=
"keywordtype">int
</span> __real_listen(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">int
</span> backlog);
</div>
153 <div class=
"line"><a name=
"l00060"></a><span class=
"lineno"> 60</span> </div>
154 <div class=
"line"><a name=
"l00061"></a><span class=
"lineno"> 61</span> <span class=
"keywordtype">int
</span> __real_accept(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">struct
</span> sockaddr *addr, socklen_t *addrlen);
</div>
155 <div class=
"line"><a name=
"l00062"></a><span class=
"lineno"> 62</span> </div>
156 <div class=
"line"><a name=
"l00063"></a><span class=
"lineno"> 63</span> <span class=
"keywordtype">int
</span> __real_getsockname(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">struct
</span> sockaddr *name, socklen_t *namelen);
</div>
157 <div class=
"line"><a name=
"l00064"></a><span class=
"lineno"> 64</span> </div>
158 <div class=
"line"><a name=
"l00065"></a><span class=
"lineno"> 65</span> <span class=
"keywordtype">int
</span> __real_getpeername(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keyword">struct
</span> sockaddr *name, socklen_t *namelen);
</div>
159 <div class=
"line"><a name=
"l00066"></a><span class=
"lineno"> 66</span> </div>
160 <div class=
"line"><a name=
"l00067"></a><span class=
"lineno"> 67</span> <span class=
"keywordtype">int
</span> __real_shutdown(
<span class=
"keywordtype">int
</span> fd,
<span class=
"keywordtype">int
</span> how);
</div>
161 <div class=
"line"><a name=
"l00068"></a><span class=
"lineno"> 68</span> </div>
162 <div class=
"line"><a name=
"l00069"></a><span class=
"lineno"> 69</span> <span class=
"preprocessor">#ifdef __cplusplus
</span></div>
163 <div class=
"line"><a name=
"l00070"></a><span class=
"lineno"> 70</span> <span class=
"preprocessor"></span>}
</div>
164 <div class=
"line"><a name=
"l00071"></a><span class=
"lineno"> 71</span> <span class=
"preprocessor">#endif
</span></div>
165 <div class=
"line"><a name=
"l00072"></a><span class=
"lineno"> 72</span> <span class=
"preprocessor"></span></div>
166 <div class=
"line"><a name=
"l00073"></a><span class=
"lineno"> 73</span> <span class=
"preprocessor">#endif
</span><span class=
"comment">/* !(__KERNEL__ || __XENO_SIM__) */
</span><span class=
"preprocessor"></span></div>
167 <div class=
"line"><a name=
"l00074"></a><span class=
"lineno"> 74</span> <span class=
"preprocessor"></span></div>
168 <div class=
"line"><a name=
"l00075"></a><span class=
"lineno"> 75</span> <span class=
"preprocessor">#endif
</span><span class=
"comment">/* _XENO_POSIX_SOCKET_H */
</span><span class=
"preprocessor"></span></div>
169 </div><!-- fragment --></div><!-- contents -->
170 </div><!-- doc-content -->
171 <!-- start footer part -->
172 <div id=
"nav-path" class=
"navpath"><!-- id is needed for treeview function! -->
174 <li class=
"navelem"><a class=
"el" href=
"dir_d44c64559bbebec7f509842c48db8b23.html">include
</a></li><li class=
"navelem"><a class=
"el" href=
"dir_d3e581e741ee23262426234d3234c771.html">posix
</a></li><li class=
"navelem"><a class=
"el" href=
"dir_ba1fb9f9e40914a7a55fc655d792ffc7.html">sys
</a></li><li class=
"navelem"><b>socket.h
</b></li>
175 <li class=
"footer">Generated on Fri Oct
4 2013 22:
39:
06 for Xenomai API by
176 <a href=
"http://www.doxygen.org/index.html">
177 <img class=
"footer" src=
"doxygen.png" alt=
"doxygen"/></a> 1.8.1.2 </li>