/Types/* added

This commit is contained in:
/jdi/ 2015-10-11 23:07:04 +02:00
parent 7f3e5fc0d9
commit ad92736b74
18 changed files with 306 additions and 81 deletions

View file

@ -10,45 +10,11 @@
#include <string>
#include <map>
#include "Types.h"
#include "Types/bytes.h"
#include "Types/datasets.h"
#include "Types/Types.h"
#define DEFAULT_USER "admin"
#define DEFAULT_PASS "admin"
static std::map<int,std::string> rcv_lookup= {
{ 1, "type"},//string
{ 2, "hostname"},//string
{ 3, "mac"},//byte[6]
{ 4, "ip_addr"},//byte[4]
{ 5, "ip_mask"},//byte[4]
{ 6, "gateway"},//byte[4]
{ 7, "firmware_version"},//string
{ 8, "hardware_version"},//string
{ 9, "dhcp"}};//bool byte
static std::map<int,std::string> snd_lookup= {
{10,"???"},//after login
{2,"???"},//after login
{512,"login_user"},//string
{513,"new_user"},//string
{514,"login_password"},//string
{515,"new_passwoord"},//string
{2200,"vlan"},
{2305,"???"},//sent before login and before change hostname
{4608,"port_trunk"},//byte[5] last byte bitmask??
{8192,"mtu_vlan"},//byte[2] first byte bool, second byte port id
{8449,"port_vlan"},//???
{8705,"802.1q vlan"},//???
{8706,"802.1q vlan pvid"},//????
{12288,"QoS Basic"},//bool = QoS Mod
{16640,"port_mirror"},//byte[10] second byte port id??
{17152,"loop_prevention"},//bool byte
//{0000," "},
};
struct vlan {
int vlan_id;
std::string name;
@ -69,6 +35,7 @@ public:
Switch() {
}
void parse(datasets);
void parse(dataset);
struct {
std::string type;
std::string hardware_version;