Skip to content

Conversation

@xraystyle
Copy link

This pull request implements the -br flag for brief output as it would work on iproute2 on Linux.

Example:

iproute2mac(master)/ $: ./src/ip.py -br a
lo0              UNKNOWN        127.0.0.1/8 ::1/128 fe80::1/64
gif0             UNKNOWN
stf0             UNKNOWN
anpi0            DOWN
anpi1            DOWN
anpi2            DOWN
en4              DOWN
en5              DOWN
en6              DOWN
en1              DOWN
en2              DOWN
en3              DOWN
bridge0          DOWN
pktap0           UNKNOWN
utun0            UNKNOWN        fe80::b9c9:9b0d:3cd3:d472/64
utun1            UNKNOWN        fe80::9f4b:b3ec:69ef:e035/64
ap1              DOWN
en0              UP             fe80::8a1:4aa3:eac7:3a43/64 10.0.0.240/24
awdl0            UP             fe80::c82f:57ff:fece:1b20/64
llw0             UNKNOWN        fe80::c82f:57ff:fece:1b20/64
utun2            UNKNOWN        fe80::917e:1dfc:aced:e98e/64
utun3            UNKNOWN        fe80::ce81:b1c:bd2c:69e/64
en7              UP             fe80::89f:2e64:1c95:ca82/64 10.0.0.238/24
utun4            UNKNOWN        10.10.24.5/32 fe80::a2ce:c8ff:feb1:24fd/64 fc00:1334:8228:a86f:5c56:4bbd:e983:8c0d/64

Additional tests have been added to check the flag is parsed correctly and working.

@xraystyle
Copy link
Author

Hey @brona , any chance of a merge?

@brona
Copy link
Owner

brona commented Jul 15, 2025

Hi, hopefully I will get to this by end of July, I have some time off planned so I will go through the PRs here and merge them & release.

@brona
Copy link
Owner

brona commented Aug 7, 2025

Any chance you could sync the PR to current master and resolve conflicts? Thanks

1 similar comment
@brona
Copy link
Owner

brona commented Aug 7, 2025

Any chance you could sync the PR to current master and resolve conflicts? Thanks

@xraystyle
Copy link
Author

@brona I think I've pulled in your latest and fixed the conflicts while preserving all the functionality. Seems like it all works as expected.

Copy link
Owner

@brona brona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the PR, I added few more comments. Happy to merge afterwards.

Thanks for the contribution.

@xraystyle
Copy link
Author

Looks like everything's fixed, let me know if there's any other changes you need.

@xraystyle
Copy link
Author

@brona Is this good, or do you need any more updates?

Copy link
Owner

@brona brona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, I will hopefully get to merge it later this week. I left couple last nits.

for a in l.get("addr_info", []):
if brief:
# Brief format: interface_name STATUS ip_addresses...
# Interface name (left-padded to align)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Changelog
<details open>
<summary><b>HEAD</b></summary>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge it with the HEAD section below.

@tamas-lumen
Copy link

@xraystyle any chance you could take a look at the above comment? I really appreciate you implementing this, I've been missing this feature for a long time

@xraystyle
Copy link
Author

@xraystyle any chance you could take a look at the above comment? I really appreciate you implementing this, I've been missing this feature for a long time

I'll see if I can take a look in the next few days. I should have some free time this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants