We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
it would be great if you would also support cisco style MAC addresses as input for Pio::Mac.new out of the box.
They look e.g. like "002a.6abc.a12c"
A bit ugly but working for me (I added the elsif-part):
def parse_mac_string(mac) octet_regex = '[0-9a-fA-F][0-9a-fA-F]' if /^(#{ octet_regex }:){5}(#{ octet_regex })$/ =~ mac mac.gsub(':', '').hex elsif /^(#{ octet_regex+octet_regex }.){2}(#{ octet_regex+octet_regex })$/ =~ mac mac.gsub('.', '').hex else fail ArgumentError end end
The text was updated successfully, but these errors were encountered:
Support Cisco-style MAC addresses (refs #116).
e9dcdc1
@Sebbb I have merged the code into feature/cisco_mac branch (e9dcdc1). Please confirm that it works for you. Thanks.
Sorry, something went wrong.
Thanks, it works fine for me :)
Merge pull request #117 from trema/feature/cisco_mac
6fb4e9a
yasuhito
No branches or pull requests
Hi,
it would be great if you would also support cisco style MAC addresses as input for Pio::Mac.new out of the box.
They look e.g. like "002a.6abc.a12c"
A bit ugly but working for me (I added the elsif-part):
The text was updated successfully, but these errors were encountered: