Options.h 1.95 KB
Newer Older
/jdi/'s avatar
/jdi/ committed
1
2
3
4
5
6
7
8
9
10
/*
 * Options.h
 *
 *  Created on: 11.09.2015
 *      Author: jdi
 */

#ifndef OPTIONS_H_
#define OPTIONS_H_

/jdi/'s avatar
/jdi/ committed
11
#include "Types.h"
/jdi/'s avatar
/jdi/ committed
12
13

#define VERSION "smrtlink (v1 Linux)\n"
/jdi/'s avatar
e    
/jdi/ committed
14
#define USAGE "usage: %s [-bdhjrvswx] [-i interface] [-u [password:]username]\n\
/jdi/'s avatar
/jdi/ committed
15
16
17
	[-p password] <command>\n\n"
#define HELP "\
	Option Summary:\n\
/jdi/'s avatar
/jdi/ committed
18
19
20
21
22
23
		-h --help		This help text\n\
		-v --version		Display version of this tool\n\
		-d --debug [n]		Show debugging messages\n\
		-r			switch ports to emulate switch while sniffing\n\
		-b --header 		Show header\n\
		-x --hex 		Display Packets as Hex String\n\
/jdi/'s avatar
e    
/jdi/ committed
24
		-j --json 		Display Packets as JSON\n\
/jdi/'s avatar
/jdi/ committed
25
26
27
28
		-i --interface <iface>	only use one Interface\n\
		-u --user <[password:]username>\n\
		-p --password <password>\n\
					Login with Username and Password\n\
/jdi/'s avatar
/jdi/ committed
29
30
		-f --file <path>	choose a settings file\n\n\
		-t --timeout <n>	Timeout in milliseconds. Default: 180\n\
31
32
		-I --interactive		Not yet implemented\n\
		-O --stdout		Not yet implemented\n\
/jdi/'s avatar
/jdi/ committed
33
34
		-w --wait		Not yet implemented: blocking until operation is completed\n\
		-s --permanent		Not yet implemented: make changes immediately permanent\n\n\
/jdi/'s avatar
/jdi/ committed
35
	Command Summary:\n\
/jdi/'s avatar
/jdi/ committed
36
37
38
39
40
41
42
43
		help			This help text\n\
		list			list all connected switches\n\
		sniff [type:<type>] [<filter>]\n\
					capture and display all incoming or outgoing packets\n\
					depending on the --reverse option\n\
		encode			use encoding algorithm on hex data separated by colon\n\
		get			Not yet implemented\n\
		set			Not yet implemented\n\
/jdi/'s avatar
e    
/jdi/ committed
44
45
		get|save			Not yet implemented: save config to file\n\
		set|restore			Not yet implemented: restore onfig from file\n\
/jdi/'s avatar
/jdi/ committed
46
47
48
		flash			Not yet implemented: replace firmware\n\
		reboot			Not yet implemented\n\
		reset			Not yet implemented\n\n\
/jdi/'s avatar
/jdi/ committed
49
	### for questions please contact <smrtlink@jdi.li> ###\n\n"
50
51
52
53
54
55
//TODO
/*
 * Stdin
 * socketmode
 *
 */
/jdi/'s avatar
/jdi/ committed
56
57
58
59

#define FLAG_HEX 1
#define FLAG_REVERSE 2
#define FLAG_HEADER 4
/jdi/'s avatar
/jdi/ committed
60
61
#define FLAG_PERMANENT 8
#define FLAG_WAIT 16
/jdi/'s avatar
/jdi/ committed
62
#define FLAG_DEBUG 32
/jdi/'s avatar
/jdi/ committed
63
64
65
66

extern Options options;

#endif /* OPTIONS_H_ */