mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Replaced single_iface option with iface_mode.
This commit is contained in:
parent
f72e88ea34
commit
2f9677c3d2
@ -35,7 +35,8 @@ main_config_t get_main_config(void)
|
||||
HKEY reg = reg_open_main(false);
|
||||
DWORD version = reg_get_dword(reg, "config_version", 1);
|
||||
|
||||
config.single_iface = reg_get_dword(reg, "single_iface", true);
|
||||
config.iface_mode = reg_get_dword(reg, "iface_mode", IFACE_MODE_ALL);
|
||||
|
||||
config.single_netnum = reg_get_addr32(reg, "single_netnum", addr32_in((unsigned char[]){0x00, 0x00, 0x00, 0x01}));
|
||||
config.single_nodenum = reg_get_addr48(reg, "single_nodenum", 0);
|
||||
|
||||
@ -90,7 +91,7 @@ bool set_main_config(const main_config_t *config)
|
||||
{
|
||||
HKEY reg = reg_open_main(true);
|
||||
|
||||
bool ok = reg_set_dword(reg, "single_iface", config->single_iface)
|
||||
bool ok = reg_set_dword(reg, "iface_mode", config->iface_mode)
|
||||
&& reg_set_addr32(reg, "single_netnum", config->single_netnum)
|
||||
&& reg_set_addr48(reg, "single_nodenum", config->single_nodenum)
|
||||
|
||||
|
23
src/config.h
23
src/config.h
@ -21,6 +21,26 @@
|
||||
#define DEFAULT_PORT 54792
|
||||
#define DEFAULT_ROUTER_PORT 54793
|
||||
|
||||
/* IFACE_MODE_ALL
|
||||
*
|
||||
* Packets are sent/received on all interfaces and no source address filtering
|
||||
* is performed. A single IPX interface is presented.
|
||||
*
|
||||
* IFACE_MODE_SINGLE
|
||||
*
|
||||
* Packets are sent/received on user-chosen interfaces. A single IPX interface
|
||||
* is presented.
|
||||
*
|
||||
* IFACE_MODE_MULTI
|
||||
*
|
||||
* An IPX interface is presented for each (enabled) real interface and packets
|
||||
* are sent or received on the single underlying interface of the IPX one.
|
||||
*/
|
||||
|
||||
#define IFACE_MODE_ALL 1
|
||||
#define IFACE_MODE_SINGLE 2
|
||||
#define IFACE_MODE_MULTI 3
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -37,7 +57,8 @@ typedef struct main_config {
|
||||
|
||||
enum ipx_log_level log_level;
|
||||
|
||||
bool single_iface;
|
||||
int iface_mode;
|
||||
|
||||
addr32_t single_netnum;
|
||||
addr48_t single_nodenum;
|
||||
} main_config_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user