netlink icon indicating copy to clipboard operation
netlink copied to clipboard

rtnetlink: add a way to set netlink flags in requests

Open little-dude opened this issue 2 years ago • 3 comments

There has been several PRs to add helper methods to set the flags in the netlink header, so it seems that this is something we should provide systematically.

This PR introduces three new types to manipulate netlink flags:

  • NewFlags: flags used for "set" and "add" requests
  • DelFlags: flags used to "del" requests
  • GetFlags: flags used for "get" requests

Each request now has a set_flags method to force a certain set of flags. This may interfere with other builder methods for certain requests, or may simply render the request ineffective, so the documentation always warns users.

little-dude avatar Mar 06 '22 16:03 little-dude

@cathay4t @ffmancera I'd appreciate a review on this one if you have time, just to make sure I haven't broken anything.

little-dude avatar Mar 06 '22 17:03 little-dude

Will the new commit differ from the default flags of the original code? Does this mean that a major version number needs to be upgraded?

And there are interfaces removed.

wllenyj avatar Mar 10 '22 08:03 wllenyj

New version (0.x+1) will be released as we changed(removed) an member of pub struct.

BTW, I am still reviewing the code. Personally I am reluctant on adding new dependency, need to weight the benefit and risk.

cathay4t avatar Mar 18 '22 02:03 cathay4t