Add support for authentication and encryption

This commit is contained in:
Guillaume Meunier
2024-11-26 23:59:35 +01:00
committed by Patrick Nicolas
parent 447b77c35c
commit c6e773fd22
45 changed files with 1516 additions and 455 deletions
+37
View File
@@ -643,6 +643,43 @@ struct tree_traits<abbrev, std::chrono::nanoseconds>
}
};
template <details::fixed_string abbrev>
struct tree_traits<abbrev, std::chrono::seconds>
{
static inline int field_handle = -1;
using T = std::chrono::seconds::rep;
static void info()
{
hf_register_info hf = {
.p_id = &field_handle,
.hfinfo = {
.name = strdup(details::name_from_abbrev(abbrev.value).c_str()),
.abbrev = abbrev.value,
.type = details::field_type<T>,
.display = BASE_DEC | BASE_UNIT_STRING,
.strings = &units_seconds,
.bitmask = 0,
.blurb = "",
}};
HFILL_INIT(hf);
fields.push_back(hf);
}
static void dissect(proto_tree * tree, tvbuff_t * tvb, int & start)
{
proto_tree_add_item(tree, field_handle, tvb, start, sizeof(T), ENC_LITTLE_ENDIAN);
start += sizeof(T);
}
static size_t size(tvbuff_t * tvb, int & start)
{
start += sizeof(T);
return sizeof(T);
}
};
template <details::fixed_string abbrev>
struct tree_traits<abbrev, std::span<uint8_t>>
{