mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Refactored ipxconfig, allow enabling Ethernet encapsulation.
This commit is contained in:
parent
35d853ae54
commit
4fd24354a5
2
Makefile
2
Makefile
@ -23,7 +23,7 @@ endif
|
||||
INCLUDE := -I./include/
|
||||
|
||||
CFLAGS := -std=c99 -Wall -D_WIN32_WINNT=0x0500 -DHAVE_REMOTE $(DBG_OPT) $(INCLUDE)
|
||||
CXXFLAGS := -Wall -DHAVE_REMOTE $(DBG_OPT) $(INCLUDE)
|
||||
CXXFLAGS := -std=c++0x -Wall -DHAVE_REMOTE $(DBG_OPT) $(INCLUDE)
|
||||
|
||||
# Used by mkdeps.pl
|
||||
#
|
||||
|
@ -30,6 +30,7 @@ main_config_t get_main_config(void)
|
||||
config.udp_port = DEFAULT_PORT;
|
||||
config.w95_bug = true;
|
||||
config.fw_except = false;
|
||||
config.use_pcap = false;
|
||||
config.log_level = LOG_INFO;
|
||||
|
||||
HKEY reg = reg_open_main(false);
|
||||
@ -51,6 +52,7 @@ main_config_t get_main_config(void)
|
||||
config.udp_port = reg_get_dword(reg, "port", config.udp_port);
|
||||
config.w95_bug = reg_get_dword(reg, "w95_bug", config.w95_bug);
|
||||
config.fw_except = reg_get_dword(reg, "fw_except", config.fw_except);
|
||||
config.use_pcap = reg_get_dword(reg, "use_pcap", config.use_pcap);
|
||||
config.log_level = reg_get_dword(reg, "log_level", config.log_level);
|
||||
|
||||
reg_close(reg);
|
||||
@ -65,6 +67,7 @@ bool set_main_config(const main_config_t *config)
|
||||
bool ok = reg_set_dword(reg, "port", config->udp_port)
|
||||
&& reg_set_dword(reg, "w95_bug", config->w95_bug)
|
||||
&& reg_set_dword(reg, "fw_except", config->fw_except)
|
||||
&& reg_set_dword(reg, "use_pcap", config->use_pcap)
|
||||
&& reg_set_dword(reg, "log_level", config->log_level);
|
||||
|
||||
reg_close(reg);
|
||||
|
@ -31,6 +31,7 @@ typedef struct main_config {
|
||||
|
||||
bool w95_bug;
|
||||
bool fw_except;
|
||||
bool use_pcap;
|
||||
|
||||
enum ipx_log_level log_level;
|
||||
} main_config_t;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -82,6 +82,7 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res)
|
||||
|
||||
main_config = get_main_config();
|
||||
min_log_level = main_config.log_level;
|
||||
ipx_use_pcap = main_config.use_pcap;
|
||||
|
||||
if(main_config.fw_except)
|
||||
{
|
||||
@ -89,7 +90,6 @@ BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res)
|
||||
add_self_to_firewall();
|
||||
}
|
||||
|
||||
ipx_use_pcap = FALSE;
|
||||
addr_cache_init();
|
||||
|
||||
ipx_interfaces_init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user