-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/net: expose LOWER_UP flag in NICs #42488
Comments
Hi, the Uroot team also has an ip implementation at https://github.com/u-root/u-root/tree/master/cmds/core/ip which at this point uses net.Flags. This means we're restricted to displaying only the 5 flags currently supported. While we could read the raw flags directly and do all the parsing ourselves, it seems like it would be much nicer to have the official net package support it. |
I'm not clear if this should be in the net package or the x/net package. I don't see any difficulty to adding it to the x/net package. |
The existing type is in the net package, so I think any additions would have to go there: https://cs.opensource.google/go/go/+/master:src/net/interface.go;l=30-46;drc=58e381b0b22352dda355f6d95fa101b773766c72?ss=go
|
@prattmic is it possible to introduce a flag with OS-neutral name but with the same purposes? |
@x1unix I'm not really the best person to answer that question, as I'm not particularly involved in |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Hello. I want to be able to detect if network interface is physical or virtual.
In Linux, there is a special
LOWER_UP
flag that indicates that NIC is physical, not virtual.Currently,
net
package exposes only a few flags, but notLOWER_UP
flag:LOWER_UP
is described asIFF_LOWER_UP
at include/uapi/linux/if.hWhat did you expect to see?
Can you add please
LowerUp
flag tonet
package?What did you see instead?
The text was updated successfully, but these errors were encountered: