43
44
while (end-- > begin) {
46
"%4u %02X%02X%02X%02X%02X%02X %3u%5u %3u",
47
begin + i, curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
48
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
49
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF,
50
curr->quality, curr->idle, curr->rssi);
53
"%2u %02X%02X%02X%02X%02X%02X %3d%% %4ddBm %3u %2u %s",
55
curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
56
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
57
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF,
58
curr->quality, curr->rssi, curr->Status, curr->Port, inet_ntoa(curr->IP));
48
(sts_viewtype == dBm) ?
49
"%4u %02X%02X%02X%02X%02X%02X %3u%5u %3udBm"
51
(sts_viewtype == percentage) ?
52
"%4u %02X%02X%02X%02X%02X%02X %3u%5u %3u%%"
54
"%4u %02X%02X%02X%02X%02X%02X %3u%5u %3u",
55
begin + i, curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
56
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
57
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF,
62
} else if (stat == 2) {
63
/* ATMEL410_SBRIDGES (firmware 1.4k.1) view */
65
(sts_viewtype == dBm) ?
66
"%2u %02X%02X%02X%02X%02X%02X %3d%% %4ddBm %3u %2u %s"
68
(sts_viewtype == percentage) ?
69
"%2u %02X%02X%02X%02X%02X%02X %3d%% %3u%% %3u %2u %s"
71
"%2u %02X%02X%02X%02X%02X%02X %3d%% %3u %3u %2u %s",
73
curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
74
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
75
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF,
77
conv_rssi(curr->rssi),
82
} else if (stat == 3) {
83
/* ATMEL12350_VERNET view */
85
(sts_viewtype == dBm) ?
86
"%2u %02X%02X%02X%02X%02X%02X %02X%02X%02X%02X%02X%02X "
89
(sts_viewtype == percentage) ?
90
"%2u %02X%02X%02X%02X%02X%02X %02X%02X%02X%02X%02X%02X "
93
"%2u %02X%02X%02X%02X%02X%02X %02X%02X%02X%02X%02X%02X "
96
curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
97
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
98
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF,
99
curr->ParentMacAddress[0] & 0xFF,
100
curr->ParentMacAddress[1] & 0xFF,
101
curr->ParentMacAddress[2] & 0xFF,
102
curr->ParentMacAddress[3] & 0xFF,
103
curr->ParentMacAddress[4] & 0xFF,
104
curr->ParentMacAddress[5] & 0xFF,
105
conv_rssi(curr->rssi),
60
sprintf(message, "%4u %02X%02X%02X%02X%02X%02X",
61
begin + i, curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
62
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
63
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF);
111
/* generic ATMEL view */
112
sprintf(message, "%2u %02X%02X%02X%02X%02X%02X",
113
begin + i, curr->addr[0] & 0xFF, curr->addr[1] & 0xFF,
114
curr->addr[2] & 0xFF, curr->addr[3] & 0xFF,
115
curr->addr[4] & 0xFF, curr->addr[5] & 0xFF
65
118
mvwaddstr(main_sub, row + i, 0, message);
67
120
curr = curr->next;
69
122
wrefresh(main_sub);
73
125
void print_help(char *mess)
92
144
wattrset(win_for_help, COLOR_PAIR(1));
95
void print_title(char *mess)
99
for (i = 0; i < COLS - MCOLS - 1; i++)
100
mvwaddch(main_win, 0, i, ACS_BSBS);
101
wattrset(main_win, A_BOLD);
102
mvwaddstr(main_win, 0, COLS - MCOLS - strlen(mess) - 2, mess);
103
wattrset(main_win, A_NORMAL);
107
void print_viewtype(int v)
111
sprintf(message, "View: %c", v + '0');
112
wattrset(main_win, A_BOLD);
113
mvwaddstr(main_win, 0, 1, message);
114
wattrset(main_win, A_NORMAL);
147
void print_bold(WINDOW *wptr, char *mess)
149
wattrset(wptr, A_BOLD);
151
wattrset(wptr, A_NORMAL);
118
155
void print_menusel(int y, int x, char *mess1, char *mess2)
120
157
mvwaddstr(main_sub, y, x, mess1);
121
wattrset(main_sub, A_BOLD);
122
waddstr(main_sub, mess2);
123
wattrset(main_sub, A_NORMAL);
158
print_bold(main_sub, mess2);
127
161
void print_bottom(char *mess)
130
164
char message[100];
131
extern short ap_type;
132
extern char *ap_types[];
165
extern short ap_type, ap_vendorext;
166
extern char *ap_types[], *ap_vendorexts[][3];
134
sprintf(message, _("Current AP: %s Type: %s"), mess, ap_types[ap_type]);
168
sprintf(message, _("Current AP: %s Type: %s Ext: %s"),
169
mess, ap_types[ap_type], ap_vendorexts[ap_type][ap_vendorext]);
135
170
/* ����� ����� */
136
171
for (i = 0; i < COLS - MCOLS - 1; i++)
137
172
mvwaddch(main_win, LINES - 3, i, ACS_BSBS);
174
wmove(main_win, LINES - 3, COLS - MCOLS - strlen(message) - 1);
175
print_bold(main_win, message);
178
void print_top(char *title_left, char *title_right)
182
wmove(main_win, 0, 0);
183
while (i++ < COLS - MCOLS - 1)
184
waddch(main_win, ACS_BSBS);
138
186
wattrset(main_win, A_BOLD);
139
mvwaddstr(main_win, LINES - 3, COLS - MCOLS - strlen(message) - 1,
188
mvwaddstr(main_win, 0, 2, title_left);
191
mvwaddstr(main_win, 0, COLS - MCOLS - strlen(title_right) - 2,
141
194
wattrset(main_win, A_NORMAL);
142
195
wrefresh(main_win);
198
void print_top_rssi(char *message_r)
202
sprintf(message_l, "%s", VIEW);
203
switch (sts_viewtype) {
205
strcat(message_l, "RSSI in dBm");
208
strcat(message_l, "RSSI in percentage");
211
strcat(message_l, "RSSI in raw values");
213
print_top(message_l, message_r);
146
216
void clear_main(int m)