summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--zebra/zapi.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/zebra/zapi.go b/zebra/zapi.go
index d43362bb..74d17f28 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -514,6 +514,7 @@ func (h *Header) DecodeFromBytes(data []byte) error {
type Body interface {
DecodeFromBytes([]byte, uint8) error
Serialize() ([]byte, error)
+ String() string
}
type HelloBody struct {
@@ -529,6 +530,10 @@ func (b *HelloBody) Serialize() ([]byte, error) {
return []byte{uint8(b.RedistDefault)}, nil
}
+func (b *HelloBody) String() string {
+ return fmt.Sprintf("route_type: %d", b.RedistDefault)
+}
+
type RedistributeBody struct {
Redist ROUTE_TYPE
}
@@ -542,6 +547,10 @@ func (b *RedistributeBody) Serialize() ([]byte, error) {
return []byte{uint8(b.Redist)}, nil
}
+func (b *RedistributeBody) String() string {
+ return fmt.Sprintf("route_type: %d", b.Redist)
+}
+
type InterfaceUpdateBody struct {
Name string
Index uint32