Browse Source

more configdata

Olaf Rempel 11 years ago
parent
commit
e4aedb2332
3 changed files with 12 additions and 3 deletions
  1. 1
    1
      cfgpatch.c
  2. 10
    1
      configdata.c
  3. 1
    1
      configdata.h

+ 1
- 1
cfgpatch.c View File

@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
35 35
 	config_patch(config->data, CFG_SNMP_READ_COMMUNITY, "public1234");
36 36
 	config_patch(config->data, CFG_SNMP_WRITE_COMMUNITY, "private1234");
37 37
 
38
-	config_patch(config->data, CFG_CPUVLAN, "124");
38
+	config_patch(config->data, CFG_CPUVLANID, "124");
39 39
 
40 40
 	config_patch(config->data, CFG_PORTVLAN_MASK + 1, "124:check:all");
41 41
 	config_patch(config->data, CFG_PORTVLAN_MASK + 2, "124:nocheck:tagged");

+ 10
- 1
configdata.c View File

@@ -94,7 +94,6 @@ static int patch_snmp_community(void *config, struct cfg_patch *patch, int code,
94 94
 	return 0;
95 95
 }
96 96
 
97
-/* TODO: not working "unknown ctl bits" */
98 97
 static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
99 98
 {
100 99
 	int port = code - patch->code;
@@ -120,6 +119,8 @@ static int patch_portvlan(void *config, struct cfg_patch *patch, int code, const
120 119
 /* TODO: not working "unknown ctl bits" */
121 120
 static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, const char *parameter)
122 121
 {
122
+	return -1;
123
+
123 124
 	int id = code - patch->code;
124 125
 	if (id < 1 || id > 32)
125 126
 		return -1;
@@ -141,8 +142,11 @@ static int patch_dot1qvlan(void *config, struct cfg_patch *patch, int code, cons
141 142
 	return 0;
142 143
 }
143 144
 
145
+/* TODO: not working "unknown ctl bits" */
144 146
 static int patch_dot1qport(void *config, struct cfg_patch *patch, int code, const char *parameter)
145 147
 {
148
+	return -1;
149
+
146 150
 	int id = code - patch->code;
147 151
 	if (id < 1 || id > 32)
148 152
 		return -1;
@@ -241,6 +245,11 @@ static struct cfg_patch patcharr[] = {{
241 245
 	.offset = 0x53e8,
242 246
 	.min = 0, .max = 65536,
243 247
 }, {
248
+	.code = CFG_CPUVLANID,
249
+	.patch = patch_8bit,
250
+	.offset = 0x5d69,
251
+	.min = 1, .max = 255,
252
+}, {
244 253
 	.code = CFG_PORTENABLE_MASK,
245 254
 	.mask = 0xFFFFFFE0,
246 255
 	.patch = patch_portenable,

+ 1
- 1
configdata.h View File

@@ -14,7 +14,7 @@ enum {
14 14
 
15 15
 	CFG_MACAGEING,
16 16
 
17
-	CFG_CPUVLAN,
17
+	CFG_CPUVLANID,
18 18
 
19 19
 	CFG_SNMP_READ_COMMUNITY,
20 20
 	CFG_SNMP_WRITE_COMMUNITY,

Loading…
Cancel
Save