qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Writing a CAN driver for QEMU


From: Paolo Bonzini
Subject: Re: [Qemu-devel] Writing a CAN driver for QEMU
Date: Sun, 19 May 2013 15:19:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 19/05/2013 14:58, Paolo Bonzini ha scritto:
> Is this CAN device just an Ethernet device?  QEMU does not support other
> link-level protocols.  Adding them would be possible and interesting,
> however it would add a bit to the complexity.
> 
> Both would be the same.  In the first case, you'd probably use "-netdev
> socket" to share a virtual network between two virtual machines.  In the
> second, you would use something like "-netdev tap" (again assuming it's
> just an Ethernet device).

Ok, learnt a bit more...  You could probably implement this in two ways:
1) "-netdev socket" would probably work as a CAN->UDP gateway; 2)
connecting to a virtual CAN interface in the host, created using
SocketCAN (similar to "-netdev tap", e.g. "-netdev cantap").

In the first case, it would probably be useful to write the matching
UDP->CAN gateway program.

In any case, you have to implement both the backend and the actual device.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]