more configdata
This commit is contained in:
parent
4c81935136
commit
e4aedb2332
@ -35,7 +35,7 @@ int main(int argc, char *argv[])
|
|||||||
config_patch(config->data, CFG_SNMP_READ_COMMUNITY, "public1234");
|
config_patch(config->data, CFG_SNMP_READ_COMMUNITY, "public1234");
|
||||||
config_patch(config->data, CFG_SNMP_WRITE_COMMUNITY, "private1234");
|
config_patch(config->data, CFG_SNMP_WRITE_COMMUNITY, "private1234");
|
||||||
|
|
||||||
config_patch(config->data, CFG_CPUVLAN, "124");
|
config_patch(config->data, CFG_CPUVLANID, "124");
|
||||||
|
|
||||||
config_patch(config->data, CFG_PORTVLAN_MASK + 1, "124:check:all");
|
config_patch(config->data, CFG_PORTVLAN_MASK + 1, "124:check:all");
|
||||||
config_patch(config->data, CFG_PORTVLAN_MASK + 2, "124:nocheck:tagged");
|
config_patch(config->data, CFG_PORTVLAN_MASK + 2, "124:nocheck:tagged");
|
||||||
|
11
configdata.c
11
configdata.c
@ -94,7 +94,6 @@ static int patch_snmp_community(void *config, struct cfg_patch *patch, int code,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: not working "unknown ctl bits" */
|
|
||||||
static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
||||||
{
|
{
|
||||||
int port = code - patch->code;
|
int port = code - patch->code;
|
||||||
@ -120,6 +119,8 @@ static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const
|
|||||||
/* TODO: not working "unknown ctl bits" */
|
/* TODO: not working "unknown ctl bits" */
|
||||||
static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
||||||
{
|
{
|
||||||
|
return -1;
|
||||||
|
|
||||||
int id = code - patch->code;
|
int id = code - patch->code;
|
||||||
if (id < 1 || id > 32)
|
if (id < 1 || id > 32)
|
||||||
return -1;
|
return -1;
|
||||||
@ -141,8 +142,11 @@ static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, cons
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: not working "unknown ctl bits" */
|
||||||
static int patch_dot1qport(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
static int patch_dot1qport(void *config, struct cfg_patch *patch, int code, const char *parameter)
|
||||||
{
|
{
|
||||||
|
return -1;
|
||||||
|
|
||||||
int id = code - patch->code;
|
int id = code - patch->code;
|
||||||
if (id < 1 || id > 32)
|
if (id < 1 || id > 32)
|
||||||
return -1;
|
return -1;
|
||||||
@ -240,6 +244,11 @@ static struct cfg_patch patcharr[] = {{
|
|||||||
.patch = patch_16bit,
|
.patch = patch_16bit,
|
||||||
.offset = 0x53e8,
|
.offset = 0x53e8,
|
||||||
.min = 0, .max = 65536,
|
.min = 0, .max = 65536,
|
||||||
|
}, {
|
||||||
|
.code = CFG_CPUVLANID,
|
||||||
|
.patch = patch_8bit,
|
||||||
|
.offset = 0x5d69,
|
||||||
|
.min = 1, .max = 255,
|
||||||
}, {
|
}, {
|
||||||
.code = CFG_PORTENABLE_MASK,
|
.code = CFG_PORTENABLE_MASK,
|
||||||
.mask = 0xFFFFFFE0,
|
.mask = 0xFFFFFFE0,
|
||||||
|
@ -14,7 +14,7 @@ enum {
|
|||||||
|
|
||||||
CFG_MACAGEING,
|
CFG_MACAGEING,
|
||||||
|
|
||||||
CFG_CPUVLAN,
|
CFG_CPUVLANID,
|
||||||
|
|
||||||
CFG_SNMP_READ_COMMUNITY,
|
CFG_SNMP_READ_COMMUNITY,
|
||||||
CFG_SNMP_WRITE_COMMUNITY,
|
CFG_SNMP_WRITE_COMMUNITY,
|
||||||
|
Loading…
Reference in New Issue
Block a user