5 #define GS_MODEL 0x0001
9 #define GS_SUBNETMSK 0x0007
10 #define GS_GATEWAY 0x0008
12 #define GS_NEWPASSWORD 0x0009
13 #define GS_PASSWORD 0x000a
15 #define GS_FIRMWAREVER 0x000d
17 #define GS_PACKETSTATISTICS 0x1000
19 #define GS_VLAN 0x2800
20 #define GS_PORTSTATUS 0x0c00
21 #define GS_PORTDIAG 0x1c00
22 #define ACT_DHCP 0x000b
24 #define GS_VLANSETTING 0x2000
27 #define ACT_ADDVLAN 0x2800
28 #define ACT_DELVLAN 0x2c00
29 #define ACT_RESTART 0x0013
30 #define ACT_PORTMIRROR 0x5c00
35 #define QR_ANSWER 0x0102
36 #define QR_EXEC 0x0103
37 #define QR_EXECUTED 0x0104
39 #define MSK_PORT1 0x80
40 #define MSK_PORT2 0x40
41 #define MSK_PORT3 0x20
42 #define MSK_PORT4 0x10
43 #define MSK_PORT5 0x08
48 #define DHCP_RENEW 0x02
64 struct portStatistic {
66 unsigned long bytesIn;
67 unsigned long bytesOut;
74 struct gs105e_settings {
94 struct portStatistic portStatistics[5];
96 struct portSniffing portMonitor;
102 struct gs105e_discovered {
112 struct gs105e_discovered * next;
115 static char passwordSecret[19] = {0x4e , 0x74 , 0x67 , 0x72 , 0x53 , 0x6d , 0x61 , 0x72 , 0x74 , 0x53 , 0x77 , 0x69 , 0x74 , 0x63 , 0x68 , 0x52 , 0x6f , 0x63 , 0x6b};
117 struct gs105e_discovered * gs105e_devs ;
119 struct gs105e_settings settings;
122 int gs105e_setPassword(char * data);
124 void gs105e_init(void) ;
125 void makeHeader(unsigned int queryType);
127 void gs105e_query (void);
129 int gs105e_addVlan(int vlanId) ;
130 int gs105e_delVlan(int vlanId) ;
131 int gs105e_discover(void);
133 int gs105e_setName(char * data);