-
Notifications
You must be signed in to change notification settings - Fork 62
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
rhulme
wants to merge
41
commits into
tabacha:master
Choose a base branch
from
rhulme:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Newer switches reply directly to the client rather than via broadcast.
This ensures the sequence counter is always incremental even if building a sequence requires querying other information first.
Some work still needs to be done on the payload handling. Sometimes there's just payload starting with the length (no cmd field), sometimes the payload is as normal and includes the cmd field.
Data returned is speed and flow control status of each port
This allows the maximum speed and flow control to be set/queried
The second parameter contains all the ports that should be part of the VLAN. The third parameter contains which of those ports are tagged.
This makes it easier to use the ProSafeLinux class from other code and perform additional error handling as required.
First byte always seems to 1 The next thirteen bytes are the serial number in ASCII Then zero byte (null-terminator perhaps?) Then six unknown bytes - different from one switch to another but consistent within one switch
This allows settings on a per-port or per-vlan basis to be set in one go rather than having to call the program multiple times.
Multi-value options usually make a change to a single port or VLAN so it makes sense to allow them to be specified multiple times so that multiple ports or VLANs can be specified in a single call. Without this fix, the program will crash if only a single multi-value option is passed
This mainly affects older version of Python that don't have ordered dicts by default.
Some commands (VLAN, 802.1q, port mirroring) use a bitmap to represent affected ports. The length of the data will therefore vary as a 16-port switch will require two bytes (16 bits). Until now the code assumed 1 byte per parameter (i.e. up to 8 ports) Parsing queried data is not too difficult as the code can work out the length of each parameter based on the length of the received data. Setting data is trickier as the command has to know how many ports the switch supports but the code was written to be stateless. If one of the affected commands is detected (for setting), the number of ports is first queried and then passed on to all the affected commands.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.