iproute2mac icon indicating copy to clipboard operation
iproute2mac copied to clipboard

Added vlan and bridge management

Open signal-09 opened this issue 1 year ago • 1 comments

Also added -details option to visualize additional link info (e.g. VLAN ID).

Closes #52 Closes #53

signal-09 avatar Jun 14 '24 17:06 signal-09

Thank you for the contribution, I will look into it during the weekend.

brona avatar Jun 17 '24 20:06 brona

Sorry for not getting to this sooner, I am now finishing the 1.5.0 release, https://github.com/Homebrew/homebrew-core/pull/179084, if you want we can get back to adding the VLANs once that is done.

brona avatar Jul 31 '24 11:07 brona

First of all, happy new release! Don't worry, I started contributing to your project mainly to practice Python (I'm a beginner). To avoid causing problems to others, accelerate my learning and also practice directly on CI/CD environments, I decided to rewrite the entire project bottom-up in an isolated environment few weeks ago (https://github.com/signal-09/iproute4mac/). Feel free to reuse anything you think might be useful for your project (also suggestions are welcomed).

signal-09 avatar Aug 02 '24 08:08 signal-09

That seems like a good idea! Especially if you come up with tests that would be a great direction forward.

Btw see recent commits, there were two bugs in your parse_ifconfig implementation.

brona avatar Aug 02 '24 09:08 brona

Btw see recent commits, there were two bugs in your parse_ifconfig implementation.

I see. Thank you for prompt fixing it.

I worked a lot (as exercise) to reproduce the iproute2 skeleton and UI look&feel in my separated experiment (https://github.com/signal-09/iproute4mac/). On the ip side I suspect I have reach a sort of feature parity with your project, and some extensions like bond, bridge, vlan, and feth (the macOS semi undocumented implementation of Linux veth).

To enforce the code writing style flake8 where used, then switched to ruff, in addition to an embryonic version of pytest for functionality checks.

Most IPv4 & v6 logic where migrated to a Prefix object, derived form ipaddress; so to be able to translate iproute2 filtering (.e.g. to, from, match) with Python native operations (__eq__, __contain__, set() <= set()). My idea is to do the same with back-end commands (ifconfig, netstat, route, etc.) in some future release.

Also tried to imitate exactly the JSON output of iproute2 that, as you already know, is not fully JSON compliant... but that's it.

Needless to say, any kind of input from you is very very appreciated.

signal-09 avatar Aug 15 '24 09:08 signal-09