Skip to content

Commit 9a62781

Browse files
committed
Added type TagAndValue. Updated type Message to parse an array of TagAndValue units until end-of-data is reached. This *should* allow for a sequence of zero or more tag and value pairs.
1 parent fe88fa4 commit 9a62781

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

analyzer/protobuf.spicy

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ public type Packet = unit {
77

88
on %done {
99
# Feed into Zeek's next-layer packet analysis.
10-
zeek::forward_packet(self.payload);
10+
11+
# KBK - Comment out so we can build
12+
#zeek::forward_packet(self.payload);
1113
}
1214
};
1315

1416
# message := (tag value)*
1517
# A message is encoded as a sequence of zero or more pairs of tags and values.
1618
type Message = unit {
17-
# TODO
19+
message: TagAndValue[] &eod;
20+
};
21+
22+
type TagAndValue = unit {
23+
tag: Tag;
24+
value: Value;
1825
};
1926

2027
# tag := (field << 3) | wire_type

0 commit comments

Comments
 (0)