Lookup.h 1.83 KB
Newer Older
/jdi/'s avatar
/jdi/ committed
1
2
3
4
5
6
7
/*
 * Switch.cpp
 *
 *  Created on: 29.09.2015
 *      Author: jdi
 */

/jdi/'s avatar
e    
/jdi/ committed
8
#include "table.h"
/jdi/'s avatar
/jdi/ committed
9

/jdi/'s avatar
e    
/jdi/ committed
10
11
12
13
14
15
static table rcv_lookup = { { 1, table::STRING, "type" }, //string
		{ 2, table::STRING, "hostname" }, //string
		{ 3, table::HEX, "mac" }, //byte[6]
		{ 4, table::DEC, "ip_addr" }, //byte[4]
		{ 5, table::DEC, "ip_mask" }, //byte[4]
		{ 6, table::DEC, "gateway" }, //byte[4]
16
17
		{ 7, table::STRING, "firmware_version" },
		{ 8, table::STRING, "hardware_version" },
/jdi/'s avatar
e    
/jdi/ committed
18
		{ 9, table::DEC, "dhcp" }, //bool byte
19
		{ 19, table::DEC, "ports" }, //byte, maybe number of ports
/jdi/'s avatar
e    
/jdi/ committed
20
		{ 8704, table::HEX, "802.1q vlan" }, //???
21
22
23

		{ 12288, table::HEX, "QoS Basic 1" }, //bool = QoS Mod
		{ 12289, table::HEX, "QoS Basic 2" }, //QoS
/jdi/'s avatar
/jdi/ committed
24
25
26
		//{0000," "},
		};

/jdi/'s avatar
e    
/jdi/ committed
27
static table snd_lookup = {
/jdi/'s avatar
/jdi/ committed
28
29

// TODO find out if id is unique in response
30
31
		{ 10, table::HEX, "??? - 10" }, //after login
		{ 2, table::HEX, "system_info" }, //page sysinfo
/jdi/'s avatar
e    
/jdi/ committed
32
33
34
35
36
37
38
		{ 512, table::STRING, "login_user" }, //string
		{ 513, table::STRING, "new_user" }, //string
		{ 514, table::STRING, "login_password" }, //string
		{ 515, table::STRING, "new_passwoord" }, //string
		{ 2200, table::HEX, "vlan" }, { 2305, table::HEX, "???" }, //sent before login and before change hostname
		{ 4608, table::HEX, "port_trunk" }, //byte[5] last byte bitmask??
		{ 8192, table::HEX, "mtu_vlan" }, //byte[2] first byte bool,	second byte port id
39
40
		{ 8449, table::HEX, "port_vlan1" }, //???
		{ 8448, table::HEX, "port_vlan2" }, //open page
/jdi/'s avatar
e    
/jdi/ committed
41
42
43
		{ 8704, table::HEX, "802.1q vlan" }, //??? get vlan / set status
		{ 8705, table::HEX, "802.1q vlan" }, //???
		{ 8706, table::HEX, "802.1q vlan pvid" }, //????
/jdi/'s avatar
/jdi/ committed
44

45
46
		{ 12288, table::HEX, "QoS Basic 1" }, //bool = QoS Mod
		{ 12289, table::HEX, "QoS Basic 2" }, //QoS
/jdi/'s avatar
e    
/jdi/ committed
47
48
		{ 16640, table::HEX, "port_mirror" }, //byte[10] second byte port id??
		{ 17152, table::HEX, "loop_prevention" }, //bool byte
/jdi/'s avatar
/jdi/ committed
49
50
		//{0000," "},
		};