Skip to content

Commit

Permalink
Added type TagAndValue. Updated type Message to parse an array of Tag…
Browse files Browse the repository at this point in the history
…AndValue units until end-of-data is reached. This *should* allow for a sequence of zero or more tag and value pairs.
  • Loading branch information
TnekRex committed May 10, 2024
1 parent fe88fa4 commit 9a62781
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions analyzer/protobuf.spicy
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ public type Packet = unit {

on %done {
# Feed into Zeek's next-layer packet analysis.
zeek::forward_packet(self.payload);

# KBK - Comment out so we can build
#zeek::forward_packet(self.payload);
}
};

# message := (tag value)*
# A message is encoded as a sequence of zero or more pairs of tags and values.
type Message = unit {
# TODO
message: TagAndValue[] &eod;
};

type TagAndValue = unit {
tag: Tag;
value: Value;
};

# tag := (field << 3) | wire_type
Expand Down

0 comments on commit 9a62781

Please sign in to comment.