Add support for authentication and encryption
This commit is contained in:
committed by
Patrick Nicolas
parent
447b77c35c
commit
c6e773fd22
@@ -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>>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user