#include <string.h>
#include <sys/types.h>
#include "ap-utils.h"
-#include "ap-curses.h"
#define IPADDR _("[I] IP: ")
#define NETMASK _("[N] Netmask: ")
#define OPER _("[O] Operational mode: ")
#define REMOTE_MAC _("[M] Preferred BSSID (remote MAC addr.): ")
//#define CF_PORT _("[C] Configuration-enabled port(s): ")
-#define TRAP_PORT _("[T] Trap-sending port(s): ")
+#define TRAP_PORT _("[T] Trap-sending port: ")
#define FW_BCAST _("[R] Forward broadcast traffic: ")
//#define SB_BCAST _("[B] Isolate wireless clients (broadcast traffic): ")
#define SB_UCAST _("[U] Isolate wireless clients: ")
extern short ap_type;
+
void bridging()
{
+char *bridge_modes[6] = {
+ _("Wireless Bridge Point to MultiPoint"),
+ _("Access Point"),
+ _("Access Point client"),
+ _("Wireless Bridge Point to Point"),
+ _("Repeater"),
+ _("unknown")
+};
+
+
char sysTrapSwitch[] =
{ 0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x01, 0x01, 0x03,
0x00
{ 0x2B, 0x06, 0x01, 0x04, 0x01, 0xE0, 0x3E, 0x01, 0x01, 0x02, 0x07,
0x00
};
-*/ /* This one is ATMEL12350 TELLUS MIB specific. */
+*/
char TrapPort[] =
{ 0x2B, 0x06, 0x01, 0x04, 0x01, 0xE0, 0x3E, 0x01, 0x01, 0x02, 0x08,
0x00
0x00
};
- /* These 3 are ATMEL12350 MIB specific. */
- char ForwardBroadcast[] =
+ char ForwarbBcast[] =
{ 0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x01, 0x03, 0x02,
0x00
};
m_dhcp = 0, m_ip = 0, m_mask = 0, m_gw = 0, m_remote_bssid = 0,
/*m_config_port = 0, */m_trap_port = 0, m_fw_bcast = 0, /*m_sb_bcast = 0,*/
m_sb_ucast = 0;
- char *bridge_modes[6] = {
- _("Wireless Bridge Point to MultiPoint"),
- _("Access Point"),
- _("Access Point client"),
- _("Wireless Bridge Point to Point"),
- _("Repeater"),
- ("unknown")
- }, *pr_ports[2] = {
+ char *pr_ports[2] = {
_("Ethernet"),
_("Wireless")
} /*, *cf_trap_ports[3] = {
varbinds[7].oid = bridgeOperationalMode;
varbinds[8].oid = sysTrapSwitch;
varbinds[9].oid = bridgeRemoteBridgeBSSID;
- varbinds[10].oid = ForwardBroadcast;
+ varbinds[10].oid = ForwarbBcast;
varbinds[11].oid = SendBackUnicast;
varbinds[12].oid = SendBackBcast;
- if (snmp(varbinds, 13, GET) <= 0) {
+ if (snmp(varbinds, 13, GET) < 13) {
print_helperr(ERR_RET);
goto exit;
}
- print_title(_("Bridging"));
+ print_top(NULL, _("Bridging"));
sb_ucast = *(varbinds[11].value);
// sb_ucast = varbinds[11].len_val;
i++;
}
*/ if (m_fw_bcast) {
- varbinds[i].oid = ForwardBroadcast;
- varbinds[i].len_oid = sizeof(ForwardBroadcast);
+ varbinds[i].oid = ForwarbBcast;
+ varbinds[i].len_oid = sizeof(ForwarbBcast);
varbinds[i].type = INT_VALUE;
varbinds[i].value = (char *) &fw_bcast;
varbinds[i].len_val = 1;
}
print_help(WAIT_SET);
- if (snmp(varbinds, i, SET) <= 0)
+ if (snmp(varbinds, i, SET) <= 0) {
print_helperr(ERR_SET);
- else
+ } else {
+ wbkgd(main_sub, A_NORMAL);
+ wrefresh(main_sub);
print_help(DONE_SET);
+ }
goto exit;
case 'Q':
case 'q':
exit:
getch();
quit:
- print_title("");
+ print_top(NULL, NULL);
clear_main(0);
}