<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CanFestival: /home/epimerde/documents/tc11/CanFestival-3/drivers/can_socket/can_socket.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul></div>
<h1>/home/epimerde/documents/tc11/CanFestival-3/drivers/can_socket/can_socket.c File Reference</h1><code>#include <stdio.h></code><br>
<code>#include <string.h></code><br>
<code>#include <stdlib.h></code><br>
<code>#include <stddef.h></code><br>
<code>#include <errno.h></code><br>
<code>#include "<a class="el" href="win32_2config_8h-source.html">config.h</a>"</code><br>
<code>#include <sys/socket.h></code><br>
<code>#include <sys/ioctl.h></code><br>
<code>#include "linux/can.h"</code><br>
<code>#include "linux/can/raw.h"</code><br>
<code>#include "net/if.h"</code><br>
<code>#include "<a class="el" href="can__driver_8h-source.html">can_driver.h</a>"</code><br>
<p>
<a href="can__socket_8c-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>Defines</h2></td></tr>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<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>
<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>
<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>
<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>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="546620c7e758f003b24b7fdae4f97bd4"></a><!-- doxytag: member="can_socket.c::AF_CAN" ref="546620c7e758f003b24b7fdae4f97bd4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AF_CAN PF_CAN </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="f51a5befd644cec65f24d3502b31d630"></a><!-- doxytag: member="can_socket.c::CAN_BIND" ref="f51a5befd644cec65f24d3502b31d630" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_BIND bind </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="4a4bdc94205926096ef572a540e4d025"></a><!-- doxytag: member="can_socket.c::CAN_CLOSE" ref="4a4bdc94205926096ef572a540e4d025" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_CLOSE close </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="e9e218c73b4cb73965e4412c4d50eb2e"></a><!-- doxytag: member="can_socket.c::CAN_ERRNO" ref="e9e218c73b4cb73965e4412c4d50eb2e" args="(err)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_ERRNO </td>
<td>(</td>
<td class="paramtype">err </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"> errno</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="b0e2c857f77f55e9d76239af529340ef"></a><!-- doxytag: member="can_socket.c::CAN_IFNAME" ref="b0e2c857f77f55e9d76239af529340ef" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_IFNAME "can%s" </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="56776428046c869321581cd587514964"></a><!-- doxytag: member="can_socket.c::CAN_IOCTL" ref="56776428046c869321581cd587514964" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_IOCTL ioctl </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="b78c6a888be103b97e95bfc85f5da083"></a><!-- doxytag: member="can_socket.c::CAN_RECV" ref="b78c6a888be103b97e95bfc85f5da083" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_RECV recv </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="70c9889a227060d2e902e298858c1f36"></a><!-- doxytag: member="can_socket.c::CAN_SEND" ref="70c9889a227060d2e902e298858c1f36" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_SEND send </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="3947ec96c2f7841c6a25f0d2b9989597"></a><!-- doxytag: member="can_socket.c::CAN_SOCKET" ref="3947ec96c2f7841c6a25f0d2b9989597" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CAN_SOCKET socket </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<a class="anchor" name="eac0c3db7a1e021f17987bcc76893849"></a><!-- doxytag: member="can_socket.c::PF_CAN" ref="eac0c3db7a1e021f17987bcc76893849" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PF_CAN 29 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="76e6a915d0e40a23b863198b2aaa5545"></a><!-- doxytag: member="can_socket.c::canClose_driver" ref="76e6a915d0e40a23b863198b2aaa5545" args="(CAN_HANDLE fd0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int canClose_driver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td>
<td class="paramname"> <em>fd0</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
<p>
References <a class="el" href="can__socket_8c-source.html#l00052">CAN_CLOSE</a>.
</div>
</div><p>
<a class="anchor" name="945403aba7f36acbd2e7160ade361bab"></a><!-- doxytag: member="can_socket.c::canOpen_driver" ref="945403aba7f36acbd2e7160ade361bab" args="(s_BOARD *board)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> canOpen_driver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> * </td>
<td class="paramname"> <em>board</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
<p>
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>.
</div>
</div><p>
<a class="anchor" name="6b3248e95acf2b08d1fd8b42610cc5a6"></a><!-- doxytag: member="can_socket.c::canReceive_driver" ref="6b3248e95acf2b08d1fd8b42610cc5a6" args="(CAN_HANDLE fd0, Message *m)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UNS8 canReceive_driver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td>
<td class="paramname"> <em>fd0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td>
<td class="paramname"> <em>m</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
<p>
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>.
</div>
</div><p>
<a class="anchor" name="def95aee49efa13dd047d0b3b5507ad3"></a><!-- doxytag: member="can_socket.c::canSend_driver" ref="def95aee49efa13dd047d0b3b5507ad3" args="(CAN_HANDLE fd0, Message *m)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UNS8 canSend_driver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#712c7b28987b12b8d400df19c92d0f5e">CAN_HANDLE</a> </td>
<td class="paramname"> <em>fd0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td>
<td class="paramname"> <em>m</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
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>.
<p>
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>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:07 2007 for CanFestival by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>