Building a CAN API for Arduino DUE

ah, this seems much more complicated than I had wagered on ...

I don't have much knowledge about this, so doubt I'd be able to make a whole library for it on my own ...

Could I make some haphazard venture to just "make it work" ?

I mean from the documentation from maxon, i got that it is expecting to receive :

1 bit Start of Frame
11 bit COB-ID (first 4 bits frame identifier, last 7 the ID of the receiving device)
1 bit RTR which should always be 1
6 bit control field (1 bit for identifier Extension which is to be dominant (1 ... i assume), 1 reserved bit which should also be dominant, 4 bits for Data Length Code which holds number of bytes being transfered)
The data bytes that need to be transferred
16 bit CRC. To generate the CRC, they have given a function
2 bit Acknowledge which should always be 11
7 bit End of Frame
3 bit with no data transfer (intermission)

Also, they've given an example for this also, with what the COB-ID should be like (0x600 + NODE_ID) and the data bytes should be...

... now As i had mentioned in my earlier post, if I knew exactly what Due sends via can, i.e. like which element of the structure is the ID, which element is data, etc ... I think i could achieve basic communication.

What I mean is like this : irrespective of the comm protocol, as long as i have a register somewhere that if i set it to : 1100000000111000111111111.. etc it will just put a start of frame, send the data, put end of frame and wait for the intermission, i can make it work

(this is something like UART, where i just put Serial.write('w'), it sends startframe + 'w' + endframe ... assuming no parity etc was enabled, now the 'w' may be according to some higher protocol, but for the transmitting_buffer, it doesn't really matter)

And also, for receiving, there would again be a receiving buffer (register) which i can just read in a continuous while loop ... like : i'll just put ...
if( CAN_RX_FLAG == true) {
my_msg = CAN_RX_BUF;
if(my_msg == 0x6d64f74e28.. )
Serial.print("comm was successful, motor is running ! ");
}

So ... any idea if some buffer like this are there ? or if I can use those structures in libsam for these ? Or maybe even instead of buffers, can I use mailboxes like this (as you said CanOpen is a higher protocol of Can, mailboxes would be there also ... i assume)