Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exchange custom netlink fork for neli crate#13

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

marcelbuesing
Copy link
Contributor

This removes the custom netlink dependency in exchange for theneli-crate. I have testedbring_up andbring_down and it seems to work. There is a minor difference in the send that I have not figured out yet why sa_family is not added in neli or if that is even relevant since it has the intended effect.

strace -s 100 -f -x of

let iface =CanInterface::open("vcan0").expect("Failed to lookup vcan0 iface");    iface.bring_down().unwrap();

netlink-rs fork:

bind(3, {sa_family=AF_NETLINK, nl_pid=29418, nl_groups=00000000}, 16) = 0sendto(3, {{len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=0, pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=if_nametoindex("vcan0"), ifi_flags=0, ifi_change=0x1}}, 32, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 16) = 302recvfrom(3, {{len=36, type=NLMSG_ERROR, flags=NLM_F_CAPPED, seq=0, pid=29418}, {error=0, msg={len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=0, pid=0}}}, 4096, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, [16->12]) = 36

neli:

bind(3, {sa_family=AF_NETLINK, nl_pid=960, nl_groups=00000000}, 12) = 0sendto(3, {{len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=0, pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=if_nametoindex("vcan0"), ifi_flags=0, ifi_change=0x1}}, 32, 0, NULL, 0) = 32recvfrom(3, {{len=36, type=NLMSG_ERROR, flags=NLM_F_CAPPED, seq=0, pid=960}, {error=0, msg={len=32, type=RTM_NEWLINK, flags=NLM_F_REQUEST|NLM_F_ACK, seq=0, pid=0}}}, 32768, 0, NULL, NULL) = 36

WIP: since this is still waiting for merge of:jbaublitz/neli#61, I will exchange the git link for a version once that is released.

@marcelbuesingmarcelbuesing changed the title[WIP] Exchange custom netlink fork for neli crateExchange custom netlink fork for neli crateJul 22, 2020
fpagliughi added a commit to fpagliughi/socketcan-rs that referenced this pull requestFeb 21, 2021
…18 and latest dependencies. Errors now conforming to std::error::Error.
@fpagliughi
Copy link
Collaborator

I merged this into my fork at:
https://github.com/fpagliughi/socketcan-rs/tree/develop

There were a number of breaking changes inneli since this PR was done, but I fixed those up and hit a serialization error:
jbaublitz/neli#136

But now that's all working. I still need to re-implement the wait-for-ack functionality which changed in the library, but overallneli does look like a better choice for dealing with the Netlink stuff.

marcelbuesing reacted with thumbs up emoji

@marcelbuesing
Copy link
ContributorAuthor

I merged this into my fork at:
https://github.com/fpagliughi/socketcan-rs/tree/develop

There were a number of breaking changes inneli since this PR was done, but I fixed those up and hit a serialization error:
jbaublitz/neli#136

But now that's all working. I still need to re-implement the wait-for-ack functionality which changed in the library, but overallneli does look like a better choice for dealing with the Netlink stuff.

I think neli 0.5.3 that was released yesterday should contain the fix?

This was referencedFeb 15, 2022
@fpagliughi
Copy link
Collaborator

Included and updated by#20 . This can be closed if/when that one is merged.

@fpagliughi
Copy link
Collaborator

#20, which contained this PR was merged to master.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@marcelbuesing@fpagliughi

[8]ページ先頭

©2009-2025 Movatter.jp