From 9b39107122321089e614d4869f52619f80f2b35d Mon Sep 17 00:00:00 2001 From: Karen Schoener Date: Mon, 25 Aug 2025 17:56:40 -0400 Subject: [PATCH 1/2] Read new field from vflow link record: configured link name --- pkg/flow/encoding.go | 3 +++ pkg/flow/record.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pkg/flow/encoding.go b/pkg/flow/encoding.go index 8fc83ea0f..462af87b4 100644 --- a/pkg/flow/encoding.go +++ b/pkg/flow/encoding.go @@ -329,6 +329,9 @@ func decode(msg *amqp.Message) []interface{} { if v, ok := m["Direction"].(string); ok { link.Direction = &v } + if v, ok := m["LinkName"].(string); ok { + link.LinkName = &v + } result = append(result, link) case Listener: diff --git a/pkg/flow/record.go b/pkg/flow/record.go index 4ccf883ab..297492db7 100644 --- a/pkg/flow/record.go +++ b/pkg/flow/record.go @@ -122,6 +122,7 @@ const ( Version // 52 Policy // 53 Target // 54 + LinkName // 55 ) var attributeNames = []string{ @@ -180,6 +181,7 @@ var attributeNames = []string{ "Version", // 52 "Policy", // 53 "Target", // 54 + "LinkName", // 55 } var Internal string = "internal" @@ -276,6 +278,7 @@ type LinkRecord struct { Name *string `json:"name,omitempty"` LinkCost *uint64 `json:"linkCost,omitempty"` Direction *string `json:"direction,omitempty"` + LinkName *string `json:"linkName,omitempty"` } type linkRecordResponse struct { From f2045c7357804d968afd3e3d29f28499dffaa483 Mon Sep 17 00:00:00 2001 From: Karen Schoener Date: Tue, 26 Aug 2025 17:17:49 -0400 Subject: [PATCH 2/2] Read new field from vflow link record: configured link name Link record attribute location contains configured link name. --- pkg/flow/encoding.go | 4 ++-- pkg/flow/record.go | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/flow/encoding.go b/pkg/flow/encoding.go index 462af87b4..1c2f95ae4 100644 --- a/pkg/flow/encoding.go +++ b/pkg/flow/encoding.go @@ -329,8 +329,8 @@ func decode(msg *amqp.Message) []interface{} { if v, ok := m["Direction"].(string); ok { link.Direction = &v } - if v, ok := m["LinkName"].(string); ok { - link.LinkName = &v + if v, ok := m["Location"].(string); ok { + link.Location = &v } result = append(result, link) diff --git a/pkg/flow/record.go b/pkg/flow/record.go index 297492db7..3c43ca0d8 100644 --- a/pkg/flow/record.go +++ b/pkg/flow/record.go @@ -122,7 +122,6 @@ const ( Version // 52 Policy // 53 Target // 54 - LinkName // 55 ) var attributeNames = []string{ @@ -181,7 +180,6 @@ var attributeNames = []string{ "Version", // 52 "Policy", // 53 "Target", // 54 - "LinkName", // 55 } var Internal string = "internal" @@ -278,7 +276,7 @@ type LinkRecord struct { Name *string `json:"name,omitempty"` LinkCost *uint64 `json:"linkCost,omitempty"` Direction *string `json:"direction,omitempty"` - LinkName *string `json:"linkName,omitempty"` + Location *string `json:"location,omitempty"` } type linkRecordResponse struct {