Lorenz Brun | 8733950 | 2023-03-07 15:49:42 +0100 | [diff] [blame^] | 1 | package main |
2 | |||||
3 | import ( | ||||
4 | "fmt" | ||||
5 | "log" | ||||
6 | |||||
7 | "google.golang.org/protobuf/encoding/prototext" | ||||
8 | |||||
9 | netdump "source.monogon.dev/net/dump" | ||||
10 | ) | ||||
11 | |||||
12 | func main() { | ||||
13 | netconf, _, err := netdump.Dump() | ||||
14 | if err != nil { | ||||
15 | log.Fatalf("failed to dump network configuration: %v", err) | ||||
16 | } | ||||
17 | fmt.Println(prototext.Format(netconf)) | ||||
18 | } |