+ # proto_register_ncp2222()
+ print """
+void
+proto_register_ncp2222(void)
+{
+
+ static hf_register_info hf[] = {
+ { &hf_ncp_func,
+ { "Function", "ncp.func", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
+
+ { &hf_ncp_length,
+ { "Packet Length", "ncp.length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
+
+ { &hf_ncp_subfunc,
+ { "SubFunction", "ncp.subfunc", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
+
+ { &hf_ncp_completion_code,
+ { "Completion Code", "ncp.completion_code", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }},
+
+ { &hf_ncp_connection_status,
+ { "Connection Status", "ncp.connection_status", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
+ """
+
+ # Print the registration code for the hf variables
+ for var in variables_used_hash.keys():
+ print "\t{ &%s," % (var.HFName())
+ print "\t{ \"%s\", \"%s\", %s, %s, %s, 0x%x, \"\", HFILL }},\n" % \
+ (var.Description(), var.DFilter(),
+ var.EtherealFType(), var.Display(), var.ValuesName(),
+ var.Mask())
+
+ print """
+ };
+
+ static gint *ett[] = {
+ """
+
+ for ett in ett_list:
+ print "\t\t&%s," % (ett,)
+
+ print """
+ };
+
+ proto_register_field_array(proto_ncp, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+ """
+
+
+ print ""