-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathdisplay-help.c
77 lines (64 loc) · 2.19 KB
/
display-help.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* horst - Highly Optimized Radio Scanning Tool
*
* Copyright (C) 2005-2016 Bruno Randolf ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/******************* HELP *******************/
#include <stdlib.h>
#include <uwifi/wlan_util.h>
#include <uwifi/util.h>
#include "display.h"
#include "main.h"
void update_help_win(WINDOW *win)
{
int i, t, col, l;
werase(win);
wattron(win, WHITE);
box(win, 0 , 0);
print_centered(win, 0, COLS, " Help ");
print_centered(win, 2, COLS, "HORST - Horsts OLSR Radio Scanning Tool (or)");
print_centered(win, 3, COLS, "HORST - Highly Optimized Radio Scanning Tool");
print_centered(win, 5, COLS, VERSION " using libuwifi %s", UWIFI_VERSION);
print_centered(win, 6, COLS, "(C) 2005-2016 Bruno Randolf, Licensed under the GPLv2");
mvwprintw(win, 8, 2, "Known IEEE802.11 Packet Types:");
for (t = 0; t < WLAN_NUM_TYPES; t++) {
wattron(win, A_BOLD);
if (t == 0) {
l = 10;
col = 4;
mvwprintw(win, l++, 2, "MANAGEMENT FRAMES");
}
else if (t == 1) {
l++;
mvwprintw(win, l++, 2, "CONTROL FRAMES");
} else {
l = 10;
col = 47;
mvwprintw(win, l++, 45, "DATA FRAMES");
}
wattroff(win, A_BOLD);
for (i = 0; i < WLAN_NUM_STYPES; i++) {
if (stype_names[t][i].c != '-')
mvwprintw(win, l++, col, "%c %-6s %s",
stype_names[t][i].c,
stype_names[t][i].name,
stype_names[t][i].desc);
}
}
wattron(win, WHITE);
print_centered(win, 39, COLS, "For more info read the man page or check http://github.com/br101/horst");
wrefresh(win);
}