MCPcopy
hub / github.com/microsoft/retina / generateTableOutput

Method generateTableOutput

shell/tracescript.go:562–584  ·  view source on GitHub ↗

generateTableOutput generates printf for table format.

()

Source from the content-addressed store, hash-verified

560
561// generateTableOutput generates printf for table format.
562func (g *ScriptGenerator) generateTableOutput() string {
563 return ` // Format source and destination with numeric reason code
564 if ($sport > 0) {
565 printf("%-12s %-10s %-18d %-18s %-18s %s:%-5d -> %s:%-5d\n",
566 strftime("%H:%M:%S", nsecs),
567 "DROP",
568 $reason,
569 "-",
570 "kfree_skb",
571 $saddr, $sport,
572 $daddr, $dport);
573 } else {
574 printf("%-12s %-10s %-18d %-18s %-18s %s -> %s\n",
575 strftime("%H:%M:%S", nsecs),
576 "DROP",
577 $reason,
578 "-",
579 "kfree_skb",
580 $saddr,
581 $daddr);
582 }
583`
584}
585
586// generateJSONOutput generates printf for JSON format.
587func (g *ScriptGenerator) generateJSONOutput() string {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected