Skip to content

Unnamed/non-netdev interface breaks parsing #1

@guysoft

Description

@guysoft

Hey, when I run

iw dev | python3 -m apparse iw device

I get:

Error parsing data: ValueError: Missing header

The otuput of iw dev is this:

phy#0
        Unnamed/non-netdev interface
                wdev 0x9
                addr 60:a5:e2:59:de:74
                type P2P-device
                txpower 0.00 dBm
        Interface wlp0s20f3
                ifindex 4
                wdev 0x1
                addr 60:a5:e2:49:de:73
                ssid SSID
                type managed
                channel 48 (5240 MHz), width: 20 MHz, center1: 5240 MHz
                txpower 22.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

It seems Unnamed/non-netdev interface breaks the parsing, if I send to to the parse a file with those lines removed then the iw dev output gets parsed fine.

I tried searching using the mac address 60:a5:e2:59:de:74 in my ip a output but can't find a device that has it, so I am not sure where its coming from.

Also thanks for sharing this parser ❤️

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions