You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I'm trying to parse radiotap headers with deku. Radiotap has a fixed header and the rest of the fields are only present, if their specific bit has been set in the header. Some of these fields are bitflags, for which I've written parser functions. In my struct they are defined as Options: ```
struct header {
//...
#[deku(
cond="present_fields.contains(IEEE80211RadiotapFields::Flags)",
reader = "read_bitflags(deku::rest)",
writer = "write_bitflags(deku::output, &self.present_fields)")]
flags: Option<IEEE80211RadiotapFlags>,
//...
}
I'm not sure I fully understand the question and expected behavior. Can you provide a minimal running example w/ comments which would hilight the issue?
When using a conditional field, the reader and writer functions should operate on the value of the option. And not the option itself.
The text was updated successfully, but these errors were encountered: