1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
|
3 <title>CanFestival: /home/epimerde/documents/tc11/CanFestival-3/drivers/can_socket/can_socket.c File Reference</title> |
|
4 <link href="doxygen.css" rel="stylesheet" type="text/css"> |
|
5 <link href="tabs.css" rel="stylesheet" type="text/css"> |
|
6 </head><body> |
|
7 <!-- Generated by Doxygen 1.5.1 --> |
|
8 <div class="tabs"> |
|
9 <ul> |
|
10 <li><a href="main.html"><span>Main Page</span></a></li> |
|
11 <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
|
12 <li><a href="annotated.html"><span>Data Structures</span></a></li> |
|
13 <li id="current"><a href="files.html"><span>Files</span></a></li> |
|
14 </ul></div> |
|
15 <div class="tabs"> |
|
16 <ul> |
|
17 <li><a href="files.html"><span>File List</span></a></li> |
|
18 <li><a href="globals.html"><span>Globals</span></a></li> |
|
19 </ul></div> |
|
20 <h1>/home/epimerde/documents/tc11/CanFestival-3/drivers/can_socket/can_socket.c File Reference</h1><code>#include <stdio.h></code><br> |
|
21 <code>#include <string.h></code><br> |
|
22 <code>#include <stdlib.h></code><br> |
|
23 <code>#include <stddef.h></code><br> |
|
24 <code>#include <errno.h></code><br> |
|
25 <code>#include "<a class="el" href="win32_2config_8h-source.html">config.h</a>"</code><br> |
|
26 <code>#include <sys/socket.h></code><br> |
|
27 <code>#include <sys/ioctl.h></code><br> |
|
28 <code>#include "linux/can.h"</code><br> |
|
29 <code>#include "linux/can/raw.h"</code><br> |
|
30 <code>#include "net/if.h"</code><br> |
|
31 <code>#include "<a class="el" href="can__driver_8h-source.html">can_driver.h</a>"</code><br> |
|
32 |
|
33 <p> |
|
34 <a href="can__socket_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> |
|
35 <tr><td></td></tr> |
|
36 <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
|
37 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#eac0c3db7a1e021f17987bcc76893849">PF_CAN</a> 29</td></tr> |
|
38 |
|
39 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#546620c7e758f003b24b7fdae4f97bd4">AF_CAN</a> PF_CAN</td></tr> |
|
40 |
|
41 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#b0e2c857f77f55e9d76239af529340ef">CAN_IFNAME</a> "can%s"</td></tr> |
|
42 |
|
43 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#3947ec96c2f7841c6a25f0d2b9989597">CAN_SOCKET</a> socket</td></tr> |
|
44 |
|
45 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#4a4bdc94205926096ef572a540e4d025">CAN_CLOSE</a> close</td></tr> |
|
46 |
|
47 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#b78c6a888be103b97e95bfc85f5da083">CAN_RECV</a> recv</td></tr> |
|
48 |
|
49 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#70c9889a227060d2e902e298858c1f36">CAN_SEND</a> send</td></tr> |
|
50 |
|
51 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#f51a5befd644cec65f24d3502b31d630">CAN_BIND</a> bind</td></tr> |
|
52 |
|
53 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#56776428046c869321581cd587514964">CAN_IOCTL</a> ioctl</td></tr> |
|
54 |
|
55 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#e9e218c73b4cb73965e4412c4d50eb2e">CAN_ERRNO</a>(err) errno</td></tr> |
|
56 |
|
57 <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
|
58 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#6b3248e95acf2b08d1fd8b42610cc5a6">canReceive_driver</a> (<a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> fd0, <a class="el" href="structMessage.html">Message</a> *m)</td></tr> |
|
59 |
|
60 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#def95aee49efa13dd047d0b3b5507ad3">canSend_driver</a> (<a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> fd0, <a class="el" href="structMessage.html">Message</a> *m)</td></tr> |
|
61 |
|
62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#945403aba7f36acbd2e7160ade361bab">canOpen_driver</a> (<a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> *board)</td></tr> |
|
63 |
|
64 <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="can__socket_8c.html#76e6a915d0e40a23b863198b2aaa5545">canClose_driver</a> (<a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> fd0)</td></tr> |
|
65 |
|
66 </table> |
|
67 <hr><h2>Define Documentation</h2> |
|
68 <a class="anchor" name="546620c7e758f003b24b7fdae4f97bd4"></a><!-- doxytag: member="can_socket.c::AF_CAN" ref="546620c7e758f003b24b7fdae4f97bd4" args="" --> |
|
69 <div class="memitem"> |
|
70 <div class="memproto"> |
|
71 <table class="memname"> |
|
72 <tr> |
|
73 <td class="memname">#define AF_CAN PF_CAN </td> |
|
74 </tr> |
|
75 </table> |
|
76 </div> |
|
77 <div class="memdoc"> |
|
78 |
|
79 <p> |
|
80 |
|
81 <p> |
|
82 Definition at line <a class="el" href="can__socket_8c-source.html#l00048">48</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
83 </div> |
|
84 </div><p> |
|
85 <a class="anchor" name="f51a5befd644cec65f24d3502b31d630"></a><!-- doxytag: member="can_socket.c::CAN_BIND" ref="f51a5befd644cec65f24d3502b31d630" args="" --> |
|
86 <div class="memitem"> |
|
87 <div class="memproto"> |
|
88 <table class="memname"> |
|
89 <tr> |
|
90 <td class="memname">#define CAN_BIND bind </td> |
|
91 </tr> |
|
92 </table> |
|
93 </div> |
|
94 <div class="memdoc"> |
|
95 |
|
96 <p> |
|
97 |
|
98 <p> |
|
99 Definition at line <a class="el" href="can__socket_8c-source.html#l00055">55</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
100 </div> |
|
101 </div><p> |
|
102 <a class="anchor" name="4a4bdc94205926096ef572a540e4d025"></a><!-- doxytag: member="can_socket.c::CAN_CLOSE" ref="4a4bdc94205926096ef572a540e4d025" args="" --> |
|
103 <div class="memitem"> |
|
104 <div class="memproto"> |
|
105 <table class="memname"> |
|
106 <tr> |
|
107 <td class="memname">#define CAN_CLOSE close </td> |
|
108 </tr> |
|
109 </table> |
|
110 </div> |
|
111 <div class="memdoc"> |
|
112 |
|
113 <p> |
|
114 |
|
115 <p> |
|
116 Definition at line <a class="el" href="can__socket_8c-source.html#l00052">52</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
117 </div> |
|
118 </div><p> |
|
119 <a class="anchor" name="e9e218c73b4cb73965e4412c4d50eb2e"></a><!-- doxytag: member="can_socket.c::CAN_ERRNO" ref="e9e218c73b4cb73965e4412c4d50eb2e" args="(err)" --> |
|
120 <div class="memitem"> |
|
121 <div class="memproto"> |
|
122 <table class="memname"> |
|
123 <tr> |
|
124 <td class="memname">#define CAN_ERRNO </td> |
|
125 <td>(</td> |
|
126 <td class="paramtype">err </td> |
|
127 <td class="paramname"> </td> |
|
128 <td> ) </td> |
|
129 <td width="100%"> errno</td> |
|
130 </tr> |
|
131 </table> |
|
132 </div> |
|
133 <div class="memdoc"> |
|
134 |
|
135 <p> |
|
136 |
|
137 <p> |
|
138 Definition at line <a class="el" href="can__socket_8c-source.html#l00057">57</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
139 </div> |
|
140 </div><p> |
|
141 <a class="anchor" name="b0e2c857f77f55e9d76239af529340ef"></a><!-- doxytag: member="can_socket.c::CAN_IFNAME" ref="b0e2c857f77f55e9d76239af529340ef" args="" --> |
|
142 <div class="memitem"> |
|
143 <div class="memproto"> |
|
144 <table class="memname"> |
|
145 <tr> |
|
146 <td class="memname">#define CAN_IFNAME "can%s" </td> |
|
147 </tr> |
|
148 </table> |
|
149 </div> |
|
150 <div class="memdoc"> |
|
151 |
|
152 <p> |
|
153 |
|
154 <p> |
|
155 Definition at line <a class="el" href="can__socket_8c-source.html#l00050">50</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
156 </div> |
|
157 </div><p> |
|
158 <a class="anchor" name="56776428046c869321581cd587514964"></a><!-- doxytag: member="can_socket.c::CAN_IOCTL" ref="56776428046c869321581cd587514964" args="" --> |
|
159 <div class="memitem"> |
|
160 <div class="memproto"> |
|
161 <table class="memname"> |
|
162 <tr> |
|
163 <td class="memname">#define CAN_IOCTL ioctl </td> |
|
164 </tr> |
|
165 </table> |
|
166 </div> |
|
167 <div class="memdoc"> |
|
168 |
|
169 <p> |
|
170 |
|
171 <p> |
|
172 Definition at line <a class="el" href="can__socket_8c-source.html#l00056">56</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
173 </div> |
|
174 </div><p> |
|
175 <a class="anchor" name="b78c6a888be103b97e95bfc85f5da083"></a><!-- doxytag: member="can_socket.c::CAN_RECV" ref="b78c6a888be103b97e95bfc85f5da083" args="" --> |
|
176 <div class="memitem"> |
|
177 <div class="memproto"> |
|
178 <table class="memname"> |
|
179 <tr> |
|
180 <td class="memname">#define CAN_RECV recv </td> |
|
181 </tr> |
|
182 </table> |
|
183 </div> |
|
184 <div class="memdoc"> |
|
185 |
|
186 <p> |
|
187 |
|
188 <p> |
|
189 Definition at line <a class="el" href="can__socket_8c-source.html#l00053">53</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
190 </div> |
|
191 </div><p> |
|
192 <a class="anchor" name="70c9889a227060d2e902e298858c1f36"></a><!-- doxytag: member="can_socket.c::CAN_SEND" ref="70c9889a227060d2e902e298858c1f36" args="" --> |
|
193 <div class="memitem"> |
|
194 <div class="memproto"> |
|
195 <table class="memname"> |
|
196 <tr> |
|
197 <td class="memname">#define CAN_SEND send </td> |
|
198 </tr> |
|
199 </table> |
|
200 </div> |
|
201 <div class="memdoc"> |
|
202 |
|
203 <p> |
|
204 |
|
205 <p> |
|
206 Definition at line <a class="el" href="can__socket_8c-source.html#l00054">54</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
207 </div> |
|
208 </div><p> |
|
209 <a class="anchor" name="3947ec96c2f7841c6a25f0d2b9989597"></a><!-- doxytag: member="can_socket.c::CAN_SOCKET" ref="3947ec96c2f7841c6a25f0d2b9989597" args="" --> |
|
210 <div class="memitem"> |
|
211 <div class="memproto"> |
|
212 <table class="memname"> |
|
213 <tr> |
|
214 <td class="memname">#define CAN_SOCKET socket </td> |
|
215 </tr> |
|
216 </table> |
|
217 </div> |
|
218 <div class="memdoc"> |
|
219 |
|
220 <p> |
|
221 |
|
222 <p> |
|
223 Definition at line <a class="el" href="can__socket_8c-source.html#l00051">51</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
224 </div> |
|
225 </div><p> |
|
226 <a class="anchor" name="eac0c3db7a1e021f17987bcc76893849"></a><!-- doxytag: member="can_socket.c::PF_CAN" ref="eac0c3db7a1e021f17987bcc76893849" args="" --> |
|
227 <div class="memitem"> |
|
228 <div class="memproto"> |
|
229 <table class="memname"> |
|
230 <tr> |
|
231 <td class="memname">#define PF_CAN 29 </td> |
|
232 </tr> |
|
233 </table> |
|
234 </div> |
|
235 <div class="memdoc"> |
|
236 |
|
237 <p> |
|
238 |
|
239 <p> |
|
240 Definition at line <a class="el" href="can__socket_8c-source.html#l00047">47</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
241 </div> |
|
242 </div><p> |
|
243 <hr><h2>Function Documentation</h2> |
|
244 <a class="anchor" name="76e6a915d0e40a23b863198b2aaa5545"></a><!-- doxytag: member="can_socket.c::canClose_driver" ref="76e6a915d0e40a23b863198b2aaa5545" args="(CAN_HANDLE fd0)" --> |
|
245 <div class="memitem"> |
|
246 <div class="memproto"> |
|
247 <table class="memname"> |
|
248 <tr> |
|
249 <td class="memname">int canClose_driver </td> |
|
250 <td>(</td> |
|
251 <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td> |
|
252 <td class="paramname"> <em>fd0</em> </td> |
|
253 <td> ) </td> |
|
254 <td width="100%"></td> |
|
255 </tr> |
|
256 </table> |
|
257 </div> |
|
258 <div class="memdoc"> |
|
259 |
|
260 <p> |
|
261 |
|
262 <p> |
|
263 Definition at line <a class="el" href="can__socket_8c-source.html#l00228">228</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
264 <p> |
|
265 References <a class="el" href="can__socket_8c-source.html#l00052">CAN_CLOSE</a>. |
|
266 </div> |
|
267 </div><p> |
|
268 <a class="anchor" name="945403aba7f36acbd2e7160ade361bab"></a><!-- doxytag: member="can_socket.c::canOpen_driver" ref="945403aba7f36acbd2e7160ade361bab" args="(s_BOARD *board)" --> |
|
269 <div class="memitem"> |
|
270 <div class="memproto"> |
|
271 <table class="memname"> |
|
272 <tr> |
|
273 <td class="memname"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> canOpen_driver </td> |
|
274 <td>(</td> |
|
275 <td class="paramtype"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> * </td> |
|
276 <td class="paramname"> <em>board</em> </td> |
|
277 <td> ) </td> |
|
278 <td width="100%"></td> |
|
279 </tr> |
|
280 </table> |
|
281 </div> |
|
282 <div class="memdoc"> |
|
283 |
|
284 <p> |
|
285 |
|
286 <p> |
|
287 Definition at line <a class="el" href="can__socket_8c-source.html#l00150">150</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
288 <p> |
|
289 References <a class="el" href="can__socket_8c-source.html#l00048">AF_CAN</a>, <a class="el" href="can__driver_8h-source.html#l00035">struct_s_BOARD::baudrate</a>, <a class="el" href="can__driver_8h-source.html#l00034">struct_s_BOARD::busname</a>, <a class="el" href="can__socket_8c-source.html#l00055">CAN_BIND</a>, <a class="el" href="can__socket_8c-source.html#l00052">CAN_CLOSE</a>, <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00050">CAN_IFNAME</a>, <a class="el" href="can__socket_8c-source.html#l00056">CAN_IOCTL</a>, <a class="el" href="can__socket_8c-source.html#l00051">CAN_SOCKET</a>, and <a class="el" href="can__socket_8c-source.html#l00047">PF_CAN</a>. |
|
290 </div> |
|
291 </div><p> |
|
292 <a class="anchor" name="6b3248e95acf2b08d1fd8b42610cc5a6"></a><!-- doxytag: member="can_socket.c::canReceive_driver" ref="6b3248e95acf2b08d1fd8b42610cc5a6" args="(CAN_HANDLE fd0, Message *m)" --> |
|
293 <div class="memitem"> |
|
294 <div class="memproto"> |
|
295 <table class="memname"> |
|
296 <tr> |
|
297 <td class="memname">UNS8 canReceive_driver </td> |
|
298 <td>(</td> |
|
299 <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td> |
|
300 <td class="paramname"> <em>fd0</em>, </td> |
|
301 </tr> |
|
302 <tr> |
|
303 <td class="paramkey"></td> |
|
304 <td></td> |
|
305 <td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td> |
|
306 <td class="paramname"> <em>m</em></td><td> </td> |
|
307 </tr> |
|
308 <tr> |
|
309 <td></td> |
|
310 <td>)</td> |
|
311 <td></td><td></td><td width="100%"></td> |
|
312 </tr> |
|
313 </table> |
|
314 </div> |
|
315 <div class="memdoc"> |
|
316 |
|
317 <p> |
|
318 |
|
319 <p> |
|
320 Definition at line <a class="el" href="can__socket_8c-source.html#l00064">64</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
321 <p> |
|
322 References <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00053">CAN_RECV</a>, <a class="el" href="can_8h-source.html#l00042">Message::cob_id</a>, <a class="el" href="can_8h-source.html#l00046">Message::data</a>, <a class="el" href="can_8h-source.html#l00045">Message::len</a>, <a class="el" href="can_8h-source.html#l00043">Message::rtr</a>, and <a class="el" href="can_8h-source.html#l00036">SHORT_CAN::w</a>. |
|
323 </div> |
|
324 </div><p> |
|
325 <a class="anchor" name="def95aee49efa13dd047d0b3b5507ad3"></a><!-- doxytag: member="can_socket.c::canSend_driver" ref="def95aee49efa13dd047d0b3b5507ad3" args="(CAN_HANDLE fd0, Message *m)" --> |
|
326 <div class="memitem"> |
|
327 <div class="memproto"> |
|
328 <table class="memname"> |
|
329 <tr> |
|
330 <td class="memname">UNS8 canSend_driver </td> |
|
331 <td>(</td> |
|
332 <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td> |
|
333 <td class="paramname"> <em>fd0</em>, </td> |
|
334 </tr> |
|
335 <tr> |
|
336 <td class="paramkey"></td> |
|
337 <td></td> |
|
338 <td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td> |
|
339 <td class="paramname"> <em>m</em></td><td> </td> |
|
340 </tr> |
|
341 <tr> |
|
342 <td></td> |
|
343 <td>)</td> |
|
344 <td></td><td></td><td width="100%"></td> |
|
345 </tr> |
|
346 </table> |
|
347 </div> |
|
348 <div class="memdoc"> |
|
349 |
|
350 <p> |
|
351 |
|
352 <p> |
|
353 Definition at line <a class="el" href="can__socket_8c-source.html#l00090">90</a> of file <a class="el" href="can__socket_8c-source.html">can_socket.c</a>. |
|
354 <p> |
|
355 References <a class="el" href="can__socket_8c-source.html#l00057">CAN_ERRNO</a>, <a class="el" href="can__socket_8c-source.html#l00054">CAN_SEND</a>, <a class="el" href="can_8h-source.html#l00042">Message::cob_id</a>, <a class="el" href="can_8h-source.html#l00046">Message::data</a>, <a class="el" href="can_8h-source.html#l00045">Message::len</a>, <a class="el" href="can_8h-source.html#l00043">Message::rtr</a>, and <a class="el" href="can_8h-source.html#l00036">SHORT_CAN::w</a>. |
|
356 </div> |
|
357 </div><p> |
|
358 <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:07 2007 for CanFestival by |
|
359 <a href="http://www.doxygen.org/index.html"> |
|
360 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> |
|
361 </body> |
|
362 </html> |
|