init metadata

This commit is contained in:
Nico Schottelius 2019-06-24 13:15:55 +02:00
parent 4d0c4f3df0
commit 53b9c636af

View file

@ -44,6 +44,25 @@ parser TopParser(packet_in b,
out digest_data_t digest_data,
inout sume_metadata_t sume_metadata) {
state start {
/* initaliase metadata */
meta.ingress_port = 0;
meta.task = 0;
meta.switch_task = 0;
meta.chk_icmp6_na_ns = 0;
meta.chk_icmp6 = 0;
meta.chk_icmp = 0;
meta.chk_ipv4 = 0;
meta.chk_udp_v4 = 0;
meta.chk_udp_v6 = 0;
meta.chk_tcp_v4 = 0;
meta.chk_tcp_v6 = 0;
meta.length_without_ip_header = 0;
meta.cast_length = 0;
meta.table_id = 0;
b.extract(p.ethernet);
digest_data.unused = 0;