#include <string.h>
#include <sys/types.h>
#include "ap-utils.h"
-#include "ap-curses.h"
#define IPADDR _("[I] IP: ")
#define NETMASK _("[N] Netmask: ")
#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()
{
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,
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,
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++);
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]);
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);
exit:
getch();
quit:
- print_title("");
+ print_top(NULL, NULL);
clear_main(0);
}