From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4565CC77.608@domain.hid> Date: Thu, 23 Nov 2006 17:29:43 +0100 From: Wolfgang Grandegger MIME-Version: 1.0 Subject: Re: [Xenomai-help] RTCAN: multiple sockets on one device References: <4565C1D7.9060509@domain.hid> In-Reply-To: <4565C1D7.9060509@domain.hid> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai@xenomai.org Jan Kiszka wrote: > Daniel Schnell wrote: >> Hi, >> >> If one opens two sockets to one CAN port and wants to use one socket >> file descriptor for reading and the other for writing, is it possible to >> limit the writing socket to _write only_, so it doesn't receive messages >> ? Note that the messages are aways received and handled by the ISR. If nobody is waiting on messages defined by the filter definitions, they will be discarded. > Option 1: Do not bind the socket, use sendto/sendmsg for transmitting > (send requires binding). Yes, this will avoid checking one unnecessary filter definition (a bit less overhead). But using just one socket would be fine as well ;-). > Option 2: Register an impossible filter for the write-only socket. This > is suboptimal ATM. Actually we should allow registering an empty filter > list for this purpose. This has been recently discussed on the socketcan > list, but I'm not aware of any concrete result. Oliver answered and liked the idea, but there is no agreement yet. Wolfgang.