lkml.org 
[lkml]   [2006]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Controller Area Network (CAN) infrastructure
Date
On Tue, 24 Jan 2006 11:45:56 +0000
David Vrabel <dvrabel@arcom.com> wrote:

>
> This is a basic Controller Area Network (CAN) infrastructure.
>
> CAN is a serial bus network commonly used in automotive and industrial
> control applications. CAN is exclusively a broadcast network. Frames
> do not have destination addresses and instead have an ID which
> identifies the frame (generally the ID identifies the type of data in
> the payload of the frame). Nodes can selectively receive frames based
> on their ID (using mask and match bits).
>
> Since CAN is a network, CAN controller drivers are implemented as
> network devices with a few extras provided by a CAN class device. CAN
> frame aren't a whole number of octets so the user recv()'s and send()'s
> 'struct can_frame's which include all the header bits and the 8 octets
> of payload.
>
> This infrastructure provides the bare minimum required to test CAN
> controllers and is likely missing stuff necessary to actually use it in
> an application. In particular, the requirement that frames are sent via
> a packet(7) socket could do with being removed but I'm unclear on a
> method that would allow this but wouldn't be a security risk (e.g., a
> mechanism needs to be provided so you can't send/receive raw CAN frames
> on, say, an ethernet device).
>
> David Vrabel


This implementation looks racey if sysfs files are held open
and device module is removed.
Network device's can not be embedded in other structures.

Also network devices can be renamed, but your code can't handle that.

Read Documentation/networking/netdevices.txt

--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-24 20:42    [W:0.131 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site