mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Threading Types: add a bit of documentation to subnet type.
This explains how the length field is currently handled when exchanging data in both directions.
This commit is contained in:
parent
7826cbdfb6
commit
a7b1161c12
1 changed files with 8 additions and 1 deletions
|
@ -106,6 +106,13 @@ struct Value {
|
|||
} in;
|
||||
};
|
||||
|
||||
// A small note for handling subnet values: Subnet values emitted from
|
||||
// the logging framework will always have a length that is based on the
|
||||
// internal IPv6 representation (so you have to substract 96 from it to
|
||||
// get the correct value for IPv4).
|
||||
// However, the Input framework expects the "normal" length for an IPv4
|
||||
// address (so do not add 96 to it), because the underlying constructors
|
||||
// for the SubNet type want it like this.
|
||||
struct subnet_t { addr_t prefix; uint8_t length; };
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue