match f1 10 f7 00 00 00 01 00 00 00 02 00 04 66 6f 6f
decode-pair -
-match Extended-Attribute-1 = { Unit-Ext-241-Struct1.Unit-Struct1-Int1 = 1, Unit-Ext-241-Struct1.Unit-Struct1-Int2 = 2, Unit-Ext-241-Struct1.Unit-Struct1-Short = 4, Unit-Ext-241-Struct1.Unit-Struct1-String = "foo" }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct1 = { Unit-Struct1-Int1 = 1, Unit-Struct1-Int2 = 2, Unit-Struct1-Short = 4, Unit-Struct1-String = "foo" } }
+
+encode-pair -
+match f1 10 f7 00 00 00 01 00 00 00 02 00 04 66 6f 6f
pair Extended-Attribute-1.Unit-Ext-241-Struct2.Unit-Struct2-Int1 = 1, Extended-Attribute-1.Unit-Ext-241-Struct2.Unit-Struct2-Short = 4, Extended-Attribute-1.Unit-Ext-241-Struct2.Unit-Struct2-TLV.Unit-Struct2-TLV-Int1 = 6, Extended-Attribute-1.Unit-Ext-241-Struct2.Unit-Struct2-TLV.Unit-Struct2-TLV-Int2 = 7, Extended-Attribute-1.Unit-Ext-241-Struct2.Unit-Struct2-TLV.Unit-Struct2-TLV-String = "foo"
match Extended-Attribute-1 = { Unit-Ext-241-Struct2 = { Unit-Struct2-Int1 = 1, Unit-Struct2-Short = 4, Unit-Struct2-TLV = { Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo" } } }
match f1 1a f8 00 00 00 01 00 04 01 06 00 00 00 06 02 06 00 00 00 07 03 05 66 6f 6f
decode-pair -
-match Extended-Attribute-1 = { Unit-Ext-241-Struct2.Unit-Struct2-Int1 = 1, Unit-Ext-241-Struct2.Unit-Struct2-Short = 4, Unit-Ext-241-Struct2.Unit-Struct2-TLV = { Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo" } }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct2 = { Unit-Struct2-Int1 = 1, Unit-Struct2-Short = 4, Unit-Struct2-TLV = { Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo" } } }
+
+encode-pair -
+match f1 1a f8 00 00 00 01 00 04 01 06 00 00 00 06 02 06 00 00 00 07 03 05 66 6f 6f
encode-pair Extended-Attribute-1.Unit-Ext-241-Struct3.Unit-Struct3-Int = 1, Extended-Attribute-1.Unit-Ext-241-Struct3.Unit-Struct3-TLV.Unit-Struct3a.Unit-Struct3a-Ipaddr1 = 127.0.0.1, Extended-Attribute-1.Unit-Ext-241-Struct3.Unit-Struct3-TLV.Unit-Struct3a.Unit-Struct3a-Ipaddr2 = 8.8.8.8
match f1 11 f9 00 00 00 01 01 0a 7f 00 00 01 08 08 08 08
decode-pair -
-match Extended-Attribute-1 = { Unit-Ext-241-Struct3.Unit-Struct3-Int = 1, Unit-Ext-241-Struct3.Unit-Struct3-TLV = { Unit-Struct3a.Unit-Struct3a-Ipaddr1 = 127.0.0.1, Unit-Struct3a.Unit-Struct3a-Ipaddr2 = 8.8.8.8 } }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct3 = { Unit-Struct3-Int = 1, Unit-Struct3-TLV = { Unit-Struct3a = { Unit-Struct3a-Ipaddr1 = 127.0.0.1, Unit-Struct3a-Ipaddr2 = 8.8.8.8 } } } }
#
# Fixed size struct
match f1 0d fa 00 00 00 01 00 00 00 02 00 04
decode-pair -
-match Extended-Attribute-1 = { Unit-Ext-241-Struct4.Unit-Struct4-Int1 = 1, Unit-Ext-241-Struct4.Unit-Struct4-Int2 = 2, Unit-Ext-241-Struct4.Unit-Struct4-Short = 4 }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct4 = { Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4 } }
#
# Wrong-sized struct (last field missing), it just decodes what it can.
#
decode-pair f1 0b fa 00 00 00 01 00 00 00 02
-match Extended-Attribute-1 = { Unit-Ext-241-Struct4.Unit-Struct4-Int1 = 1, Unit-Ext-241-Struct4.Unit-Struct4-Int2 = 2 }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct4 = { Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2 } }
#
# Wrong-sized struct (last two fields missing), it just decodes what it can.
#
decode-pair f1 07 fa 00 00 00 01
-match Extended-Attribute-1 = { Unit-Ext-241-Struct4.Unit-Struct4-Int1 = 1 }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct4 = { Unit-Struct4-Int1 = 1 } }
#
# Wrong-sized struct (data is too long), we ignore the extra data.
#
decode-pair f1 0e fa 00 00 00 01 00 00 00 02 00 04 00
-match Extended-Attribute-1 = { Unit-Ext-241-Struct4.Unit-Struct4-Int1 = 1, Unit-Ext-241-Struct4.Unit-Struct4-Int2 = 2, Unit-Ext-241-Struct4.Unit-Struct4-Short = 4 }
+match Extended-Attribute-1 = { Unit-Ext-241-Struct4 = { Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4 } }
decode-pair ff 09 01 00 00 1a 99 05 06
-match Test-Struct.Key-Field = Sub-Struct, Test-Struct.Filler = 6809, Test-Struct.Key-Field.Sub-Struct.Nested-Sub1 = 5, Test-Struct.Key-Field.Sub-Struct.Nested-Sub2 = 6
+match Test-Struct = { Key-Field = Sub-Struct, Filler = 6809, Key-Field.Sub-Struct = { Nested-Sub1 = 5, Nested-Sub2 = 6 } }
encode-pair -
match ff 09 01 00 00 1a 99 05 06
match ff 0d 02 00 00 1a 99 ff fe fd fc fb fa
count
-match 41
+match 45
encode-pair Vendor-Specific.WiMAX.Packet-Flow-Descriptor.Classifier.Src-Spec.IP-Address = 127.0.0.1, Vendor-Specific.WiMAX.Packet-Flow-Descriptor.Classifier.Src-Spec.Port = 2112, Vendor-Specific.WiMAX.Packet-Flow-Descriptor.Classifier.Src-Spec.Port-Range = { Start = 2112, End = 6809 }
match 1a 1d 00 00 60 b5 1c 17 00 0b 14 05 12 01 06 7f 00 00 01 04 04 08 40 05 06 08 40 1a 99
-#
-# Structs not yet decoded into sub-groups
-#
decode-pair -
-match Vendor-Specific.WiMAX.Packet-Flow-Descriptor = { Classifier = { Src-Spec = { IP-Address = 127.0.0.1, Port = 2112, Port-Range.Start = 2112, Port-Range.End = 6809 } } }
+match Vendor-Specific.WiMAX.Packet-Flow-Descriptor = { Classifier = { Src-Spec = { IP-Address = 127.0.0.1, Port = 2112, Port-Range = { Start = 2112, End = 6809 } } } }
encode-pair Vendor-Specific.WiMAX.DNS-Server = ::1
match 1a 19 00 00 60 b5 34 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01