Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtrdump: add sessionid and serial to json output #132

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/rtrdump/rtrdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func (c *Client) HandlePDU(cs *rtr.ClientSession, pdu rtr.PDU) {
log.Debugf("Received: %v", pdu)
}
case *rtr.PDUEndOfData:
c.Data.Metadata.SessionID = int(pdu.SessionId)
c.Data.Metadata.Serial = int(pdu.SerialNumber)
cs.Disconnect()
log.Debugf("Received: %v", pdu)
case *rtr.PDUCacheResponse:
Expand Down
2 changes: 2 additions & 0 deletions prefixfile/prefixfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ type MetaData struct {
CountBgpSecKeys int `json:"bgpsec_pubkeys"`
Buildtime string `json:"buildtime,omitempty"`
GeneratedUnix *int64 `json:"generated,omitempty"`
SessionID int `json:"sessionid,omitempty"`
Serial int `json:"serial"`
}

type VRPJson struct {
Expand Down
Loading