netlink
netlink copied to clipboard
rtnetlink: add a way to set netlink flags in requests
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.
@cathay4t @ffmancera I'd appreciate a review on this one if you have time, just to make sure I haven't broken anything.
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.
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.