-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux SocketCAN structs and constants (attempt #2) #206
Comments
BTW... we've been discussing this work here: |
Hi @fpagliughi! So what I'd recommend is first creating a PR against libc with all of the constants that you want added. Once you've done that and it's been merged and released in a new version, let me know which constants you want added to neli and the version of libc that contains them. From there, I'll put up a PR and put out a new version with those included. Sound good? |
Thanks, @jbaublitz. What do you think about wrappers for the structs in that C header, like:
Where should that stuff live? (i.e. the config info that goes across the NetLink connection) |
Those could go into libc too, but I would likely add those separately as Rust structs in neli. That's what I've done for other similar structs. You could also define them in your own library and use the |
Hi @fpagliughi, any way I can help with this? Or is this kind of a background task? |
Hey @jbaublitz. I was having trouble figuring out how to integrate a few things, and assumed I needed to get them in here to work. But I eventually found But now I do have a submodule of structs and consts here that really should be pushed upstream to libc and neli. I have to circle through a couple of other open-source projects that need to get out, then I will get back to this. Hopefully in a few weeks. |
Big apologies for dropping the ball on #140 a while back. Work on the socketcan crate stalled while the project maintainership was being ironed out, but now a lot of progress is being made and one of the last major aspects to be added for the upcoming release is Netlink access to query and update the CANbus network interfaces.
It appears that most of what we need added is contained in the
can/netlink.h
header as can be seen here:https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/can/netlink.h
It doesn't look too crazy; a few constants, bitflags, and structs. The things I'm still uncertain about is which parts of it might go here in the
neli
crate, which inlibc
, and what is best to just drop into thesocketcan
crate.Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered: