mirror of
https://github.com/soypat/lneto.git
synced 2026-09-10 00:29:34 +00:00
add stringer methods
This commit is contained in:
+3
-1
@@ -174,8 +174,10 @@ func (frm Frame) ClearHeader() {
|
||||
}
|
||||
|
||||
func (tfrm Frame) String() string {
|
||||
src := tfrm.SourcePort()
|
||||
dst := tfrm.DestinationPort()
|
||||
seg := tfrm.Segment(len(tfrm.Payload()))
|
||||
return fmt.Sprintf("%+v", seg)
|
||||
return fmt.Sprintf("TCP :%d -> :%d %s", src, dst, seg.String())
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user