Skip to content

Commit

Permalink
snet: Extract PathReplyEntry from Path (#3324)
Browse files Browse the repository at this point in the history
  • Loading branch information
sustrik authored Nov 6, 2019
1 parent eba7482 commit 73d2cd9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/lib/snet/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ type Path interface {
Copy() Path
}

// PathReplyEntryFromPath extracts PathReplyEntry. If not possible, nil is returned.
func PathReplyEntryFromPath(p Path) *sciond.PathReplyEntry {
pth, ok := p.(*path)
if !ok {
return nil
}
return pth.sciondPath.Copy()
}

var _ Path = (*path)(nil)

type path struct {
Expand Down

0 comments on commit 73d2cd9

Please sign in to comment.