Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for additional protocol commands (for GS30x series) #35

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8c152d1
Fix some syntax to make it work with Python3
rhulme Sep 29, 2020
24826d4
Listen on both broadcast and unicast addresses for replies from switch
rhulme Sep 30, 2020
d1c9e57
Command 0x7400 retrieves supported TLVs (bitfield not yet decoded)
rhulme Oct 30, 2020
1e54863
Make leading whitespace in nsdp.lua consistent (4 spaces per soft tab)
rhulme Oct 30, 2020
d37793b
Show command name (or number if not recognized) instead of FIXME
rhulme Oct 30, 2020
836d727
Fix typo
rhulme Oct 30, 2020
33b886b
Create nsdp header after assembling commands.
rhulme Oct 31, 2020
ebe29a4
Cache IP address directly in ip_from_mac.
rhulme Oct 31, 2020
cac4624
Add decoding of errors.
rhulme Oct 31, 2020
8b3fbc9
Add decoding of 'number of ports'
rhulme Oct 31, 2020
66cdd63
Add support for broadcast filtering (0x5400)
rhulme Oct 31, 2020
0226a69
Speed status (0x0c00) is now port status
rhulme Oct 31, 2020
294f875
Show values of 0x0002 and 0x000c in Wireshark
rhulme Oct 31, 2020
4dbc736
Add decoding of ingress, egress and broadcast rate limits
rhulme Oct 31, 2020
cce1d1b
Decode QoS mode
rhulme Oct 31, 2020
14aa1e1
Add decoding of QoS port-based priorities
rhulme Oct 31, 2020
3a9ddcd
Add 'port_admin' command (0x9400)
rhulme Nov 1, 2020
6f25ff8
Add 'loop detection' (0x9000)
rhulme Nov 1, 2020
d8e7f91
Decode port mirroring
rhulme Nov 1, 2020
c736388
Add decoding of vlan802_id (0x2800) and vlan_pvid (0x3000)
rhulme Nov 1, 2020
bb11e55
Add 'delete vlan' (0x2c00)
rhulme Nov 1, 2020
a389a06
Allow creation of a new VLAN without assigning any ports
rhulme Nov 1, 2020
79191bb
Rename parameters of vlan802_id (0x2800)
rhulme Nov 7, 2020
32f77db
Add support of new password mechanism
rhulme Dec 5, 2020
50a88af
Make python3 the default interpreter
rhulme Mar 14, 2021
5841d05
Remove trailing whitespace
rhulme Mar 14, 2021
dcc76ed
Decode cable testing
rhulme Mar 25, 2021
380baf2
Encapsulate errors in a separate class
rhulme Mar 25, 2021
4ff1d22
Allow ports to be passed as a list as well as a comma-separated string
rhulme Mar 25, 2021
14ca35c
Improve Wireshark decoding of vlan_pvid, delete_vlan and vlan802_id q…
rhulme Mar 25, 2021
63fdf4f
Add support for querying a switch's serial number
rhulme Mar 25, 2021
bdd8f55
Allow commands to be set multiple times in one transaction.
rhulme Mar 25, 2021
6ec672a
Support discover multiple devices
hamarituc Dec 5, 2021
53737b7
Fix setting a single multi-value option
rhulme Jun 28, 2022
d6f235a
Add missing Wireshark decoding of VLAN_ID
rhulme Jul 1, 2022
b59c169
Fix variable name for tagged ports (802.1q)
rhulme Jul 2, 2022
a61c342
Make sure that the password (hash) is transmitted before anything else.
rhulme Jul 3, 2022
b4fcd57
Report number of ports in decimal rather than hex
rhulme Jul 3, 2022
c43bb8c
Fix support for switches with more than 8 ports
rhulme Jul 3, 2022
5c0bb0e
Don't crash if a single value is received when a list was expected
rhulme Jul 3, 2022
3cbce0f
Fix uninitialised variable in 'discover'
rhulme Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing Wireshark decoding of VLAN_ID
  • Loading branch information
rhulme committed Jul 1, 2022
commit d6f235a317ea4b8a9d76038c47832767188d7931
9 changes: 9 additions & 0 deletions wireshark/nsdp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ local f_port_mirror_dest=ProtoField.uint8("nsdp.port_mirror_dest", "Destination

local f_pvid_vlan=ProtoField.uint16("nsdp.pvid_vlan", "VLAN")
local f_del_vlan=ProtoField.uint16("nsdp.del_vlan", "Delete VLAN")
local f_vlan=ProtoField.uint16("nsdp.vlan", "VLAN")
local f_vlan_ports=ProtoField.uint8("nsdp.vlan_ports", "VLAN ports", base.HEX)
local f_802_1q_vlan = ProtoField.uint16("nsdp.802_1q_vlan", "802.1q VLAN")
local f_802_1q_ports = ProtoField.uint8("nsdp.802_1q_ports", "802.1q ports", base.HEX)
local f_802_1q_tagged = ProtoField.uint8("nsdp.802_1q_tagged", "802.1q tagged", base.HEX)
Expand Down Expand Up @@ -216,6 +218,7 @@ p_nsdp.fields = {f_type,f_status,f_source,f_destination,f_seq,f_cmd,f_password,f
f_fixme0002, f_fixme000C,
f_qos_mode, f_qos_port_prio,
f_pvid_vlan, f_del_vlan,
f_vlan, f_vlan_ports,
f_802_1q_vlan, f_802_1q_ports, f_802_1q_tagged,
f_cable_test_status, f_cable_test_distance,
f_bcast_filtering,f_rate_limit,f_port_admin_speed,
Expand Down Expand Up @@ -426,6 +429,12 @@ function p_nsdp.dissector (buf, pkt, root)
tree:add(f_cable_test_distance, distance)
elseif cmd==0x2000 and len==0x01 then
tree=subtree:add(f_vlan_engine,buf(offset,len))
elseif cmd==0x2400 and len==0x03 then
local vlan=buf(offset,2)
local ports=buf(offset+2,1)
tree=subtree:add(buf(offset,len), string.format("VLAN status: VLAN:%u, Ports:%s", vlan:uint(), port_list(ports:uint())))
tree:add(f_vlan, vlan)
tree:add(f_vlan_ports, ports)
elseif cmd==0x2800 and len==0x04 then
local vlan=buf(offset,2)
local ports=buf(offset+2,1)
Expand Down