Re: [RFC] Controller Area Network (CAN) infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Jan 2006 11:45:56 +0000
David Vrabel <[email protected]> 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 <[email protected]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux