-
I'm trying to implement libtock-c 's udp bind function in my forked libtock-rs code. However, when I try to add data to the buffer that holds the address that the UDP driver should bind to with When should I write the address to Below is a code snippet from the previously referenced file to provide context.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
In Tock 2.0, you're supposed to finish writing to the buffer before sharing it to the kernel via read-write allow. I'm not familiar with the UDP driver, but is that possible? If not, the UDP driver's syscall API will need to be changed to make that possible. |
Beta Was this translation helpful? Give feedback.
-
I'm getting Err(BADRVAL) when calling the UDP bind command, but I thinnk I am passing in the same data that C's udp_send is. @hudson-ayers could you give a quick look at my interface code and see if I'm doing anyting obviously wrong? My next step is to add finer grained error messages to the UDP driver to find out why it is failing. I compared the two buffers after the bind call between the C
and my calling code example udp_send.rs where the same buffers are being shown in decimal value.
It appears they are the same as the C version. |
Beta Was this translation helpful? Give feedback.
In Tock 2.0, you're supposed to finish writing to the buffer before sharing it to the kernel via read-write allow. I'm not familiar with the UDP driver, but is that possible?
If not, the UDP driver's syscall API will need to be changed to make that possible.