X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ap-utils.git;a=blobdiff_plain;f=src%2Fbridge.c;fp=src%2Fbridge.c;h=7833cc510ffb38f72cc0f5cafcdd8274a7a21e60;hp=8c065004f775ce06c69b8ec0c8f578065559b855;hb=db905ff22705494136f504425cf0c75bb94cb81c;hpb=67fc54773e1504698e80c9cb83977bde32665350 diff --git a/src/bridge.c b/src/bridge.c index 8c06500..7833cc5 100644 --- a/src/bridge.c +++ b/src/bridge.c @@ -22,7 +22,6 @@ #include #include #include "ap-utils.h" -#include "ap-curses.h" #define IPADDR _("[I] IP: ") #define NETMASK _("[N] Netmask: ") @@ -40,9 +39,7 @@ #define SB_UCAST _("[U] Isolate wireless clients (unicast traffic): ") #define HELP _("INGFPDOMSCTRBU - set; W - write conf; Q - quit to menu") -extern short ap_type; -extern char IS_ATMEL410_SBRIDGES; -extern char IS_ATMEL12350_TELLUS; +extern short ap_type, ap_vendorext; void bridging() { @@ -172,16 +169,17 @@ void bridging() varbinds[i++].oid = ForwardBroadcast; varbinds[i++].oid = SendBackBcast; varbinds[i++].oid = SendBackUnicast; - if (IS_ATMEL12350_TELLUS) + if (ap_vendorext == TELLUS || ap_vendorext == VERNET) varbinds[i++].oid = TrapPort; } + print_help(WAIT_RET); if (snmp(varbinds, i, GET) <= 0) { print_helperr(ERR_RET); goto exit; } - print_title(_("Bridging")); + print_top(NULL, _("Bridging")); sprintf(message, "%s%02X%02X%02X%02X%02X%02X", MAC, varbinds[0].value[0] & 0xFF, @@ -208,7 +206,7 @@ void bridging() sprintf(message, "%s%s", IP_FILTER, (filter == 1) ? ON : OFF); mvwaddstr(main_sub, 3, 0, message); - if (IS_ATMEL410_SBRIDGES) { + if (ap_vendorext == SBRIDGES) { sprintf(message, "%s%02X%02X%02X%02X%02X%02X", SB_ATTMAC, *(varbinds[2].value +0) & 0xFF, *(varbinds[2].value +1) & 0xFF, *(varbinds[2].value +2) & 0xFF, *(varbinds[2].value +3) & 0xFF, @@ -248,7 +246,7 @@ void bridging() sprintf(message, "%s%s", CF_PORT, cf_trap_ports[config_port]); mvwaddstr(main_sub, 9, 0, message); - if (IS_ATMEL12350_TELLUS) { + if (ap_vendorext == TELLUS || ap_vendorext == VERNET) { for (i = 0; i < varbinds[14].len_val; trap_port += varbinds[14].value[i] * (1 << ((varbinds[14].len_val - i - 1) * 8)), i++); @@ -298,7 +296,7 @@ void bridging() continue; case 'P': case 'p': - if (!IS_ATMEL410_SBRIDGES) { + if (ap_vendorext != SBRIDGES) { primary_port = menu_choose(4, strlen(PR_PORT), pr_ports, 2) + 1; clear_main_new(4, 5); print_menusel(4, 0, PR_PORT, pr_ports[primary_port - 1]); @@ -365,7 +363,7 @@ void bridging() continue; case 'T': case 't': - if (IS_ATMEL12350_TELLUS) { + if (ap_vendorext == TELLUS || ap_vendorext == VERNET) { get_value(message, 10, strlen(TRAP_PORT), 6, INT_STRING, 0, 65535, HELP); trap_port = atoi(message); @@ -539,7 +537,7 @@ void bridging() exit: getch(); quit: - print_title(""); + print_top(NULL, NULL); clear_main(0); }