Skip to content

Commit

Permalink
Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickid2018 committed Jul 12, 2024
1 parent e4b4c54 commit 1df7b4b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mc_dissector.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ WS_DLL_PUBLIC_DEF _U_ const int plugin_want_minor = WIRESHARK_VERSION_MINOR;

WS_DLL_PUBLIC _U_ void plugin_register();

int proto_mc = -1;
int proto_mcje = -1;
int proto_mcbe = -1;

module_t *pref_mc = NULL;
gchar *pref_protocol_data_dir = DATA_FILE_PATH;
module_t *pref_mcje = NULL;
gchar *pref_ignore_packets_je = "c:map_chunk";
gchar *pref_secret_key = "";
Expand All @@ -29,6 +32,12 @@ void proto_register() {
proto_register_mcbe();

// Preference ------------------------------------------------------------------------------------------------------
proto_mc = proto_register_protocol("Minecraft", "Minecraft", "Minecraft");
pref_mc = prefs_register_protocol(proto_mc, NULL);
prefs_register_filename_preference(
pref_mc, "protocol_data_dir", "Protocol Data Directory",
"Directory for protocol data", (const char **) &pref_protocol_data_dir, false
);
pref_mcje = prefs_register_protocol_subtree("Minecraft", proto_mcje, NULL);
prefs_register_string_preference(
pref_mcje, "ignore_packets", "Ignore Packets",
Expand Down
5 changes: 5 additions & 0 deletions protocol/storage/storage.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//
// Created by nickid2018 on 24-7-13.
//

#include "storage.h"
10 changes: 10 additions & 0 deletions protocol/storage/storage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Created by nickid2018 on 24-7-13.
//

#ifndef MC_DISSECTOR_STORAGE_H
#define MC_DISSECTOR_STORAGE_H



#endif //MC_DISSECTOR_STORAGE_H

0 comments on commit 1df7b4b

Please sign in to comment.