more configdata

This commit is contained in:
Olaf Rempel 2007-05-02 20:28:50 +02:00
parent 4c81935136
commit e4aedb2332
3 changed files with 12 additions and 3 deletions

View File

@ -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_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 + 2, "124:nocheck:tagged");

View File

@ -94,7 +94,6 @@ static int patch_snmp_community(void *config, struct cfg_patch *patch, int code,
return 0;
}
/* TODO: not working "unknown ctl bits" */
static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
{
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" */
static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
{
return -1;
int id = code - patch->code;
if (id < 1 || id > 32)
return -1;
@ -141,8 +142,11 @@ static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, cons
return 0;
}
/* TODO: not working "unknown ctl bits" */
static int patch_dot1qport(void *config, struct cfg_patch *patch, int code, const char *parameter)
{
return -1;
int id = code - patch->code;
if (id < 1 || id > 32)
return -1;
@ -240,6 +244,11 @@ static struct cfg_patch patcharr[] = {{
.patch = patch_16bit,
.offset = 0x53e8,
.min = 0, .max = 65536,
}, {
.code = CFG_CPUVLANID,
.patch = patch_8bit,
.offset = 0x5d69,
.min = 1, .max = 255,
}, {
.code = CFG_PORTENABLE_MASK,
.mask = 0xFFFFFFE0,

View File

@ -14,7 +14,7 @@ enum {
CFG_MACAGEING,
CFG_CPUVLAN,
CFG_CPUVLANID,
CFG_SNMP_READ_COMMUNITY,
CFG_SNMP_WRITE_COMMUNITY,