Skip to content

Commit

Permalink
Complete column names
Browse files Browse the repository at this point in the history
Signed-off-by: gray <[email protected]>
  • Loading branch information
jschwinger233 authored and brb committed May 28, 2024
1 parent 1a5a781 commit 90d8c4c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/pwru/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ func (o *output) PrintHeader() {
if o.flags.OutputTS != "none" {
fmt.Fprintf(o.writer, " %16s", "TIMESTAMP")
}
if o.flags.OutputMeta {
fmt.Fprintf(o.writer, " %s %s %s %s %s %s", "NETNS", "MARK", "IFACE", "PROTO", "MTU", "LEN")
}
if o.flags.OutputTuple {
fmt.Fprintf(o.writer, " %s", "TUPLE")
}
fmt.Fprintf(o.writer, "\n")
}

Expand Down Expand Up @@ -288,7 +294,7 @@ func getShinfoData(event *Event, o *output) (shinfoData string) {
}

func getMetaData(event *Event, o *output) (metaData string) {
metaData = fmt.Sprintf("netns=%d mark=%#x iface=%s proto=%#04x mtu=%d len=%d",
metaData = fmt.Sprintf("%d %#x %s %#04x %d %d",
event.Meta.Netns, event.Meta.Mark,
o.getIfaceName(event.Meta.Netns, event.Meta.Ifindex),
byteorder.NetworkToHost16(event.Meta.Proto), event.Meta.MTU, event.Meta.Len)
Expand Down

0 comments on commit 90d8c4c

Please sign in to comment.