NuttX CAN Implementation NuttX Ethernet Implementation
+-------------------------------+ +-------------------------------+
| Application | | Application |
+-------------------------------+ +-------------------------------+
+-------------------------------+ +-------------------------------+
| POSIX Interface | | POSIX Interface |
+-------------------------------+ +-------------------------------+
+-------------+ +-------------+ +-------------+ +-------------+
|System calls | |VFS (fs/vfs) | |System calls | |BSD socket |
| | | | | | |net/sockets |
+-------------+ +-------------+ +-------------+ +-------------+
+-------------------------------+ +-------------------------------+
| NuttX CAN Driver (can.c) | | NuttX Network driver |
| +------------+ +------------+ | | +------------+ +------------+ |
| |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | |
| | | |glue | | | | | |glue | |
| +------------+ +------------+ | | +------------+ +------------+ |
+-------------------------------+ +-------------------------------+
+-------------------------------+ +-------------------------------+
| Hardware CAN driver | | Hardware MAC driver |
+-------------------------------+ +-------------------------------+
+-------------------------------+ +-------------------------------+
|OS (sched/), memory manager | |OS (sched/), memory manager |
|(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)|
+-------------------------------+ +-------------------------------+
+-------------------------------+ +-------------------------------+
| Hardware | | Hardware |
+-------------------------------+ +-------------------------------+
(Note this is ASCII art use a monospace font to view correctly)
I believe that both sides would be the same. Both would use BSD
sockets, SocketCAN would be added to the network stacks, and the CAN
drivers would be a network drivers.
Your picture shows the existing implementation using character drivers.
SocketCAN is intended to be integrated into the network.