my_proto = Proto("my_proto","My Protocol (description)") my_proto.fields.len = ProtoField.uint16("my_proto.len","Len") my_proto.fields.data = ProtoField.bytes("my_proto.data","Data", base.SPACE) function my_proto.dissector(buffer, pinfo, tree) pinfo.cols.protocol = "MYPROTO" local subtree = tree:add(my_proto, buffer(), "My Protocol") local len = buffer(0, 2):le_uint() -- le_ はリトルエンディアン local data