Add ifIndex support

This commit is contained in:
litong 2019-07-18 15:21:21 +08:00
parent 7ffe40e0db
commit 1f9466536e
1 changed files with 1 additions and 1 deletions

View File

@ -26,6 +26,7 @@ type IOCountersStat struct {
Dropout uint64 `json:"dropout"` // total number of outgoing packets which were dropped (always 0 on OSX and BSD)
Fifoin uint64 `json:"fifoin"` // total number of FIFO buffers errors while receiving
Fifoout uint64 `json:"fifoout"` // total number of FIFO buffers errors while sending
}
// Addr is implemented compatibility to psutil
@ -121,7 +122,6 @@ func InterfacesWithContext(ctx context.Context) ([]InterfaceStat, error) {
for _, ifi := range is {
var flags []string
if ifi.Flags&net.FlagUp != 0 {
flags = append(flags, "up")
}