// SeqTimes returns the timestamps and sequence numbers that are strictly
// increasing within d.
SeqTimes returns the timestamps and sequence numbers that are strictly
increasing within d.
// SeqTimes returns the timestamps and sequence numbers that are strictly // increasing within d .
func SEQTimes(d []*pkt.Packet) ([]time.Time, []uint32, error) {
	var t []time.Time
	var a []uint32
	var tcp *pkt.TcpHdr
	var ok bool
	var seq uint32
	for i := range d {
		tcp, ok = d[i].Headers[pkt.TransportLayer].(*pkt.TcpHdr)
		if !ok || tcp == nil {
			return t, a, ErrTransportLayerHeader
		}
		if tcp.Seq > seq {
			t = append(t, d[i].Time)
			a = append(a, tcp.Seq)
			seq = tcp.Seq
		}
	}
	return t, a, nil
}
func SEQTimes ( d [ ] * pkt . Packet ) ( [ ] time . Time , [ ] uint32 , error ) { var t [ ] time . Time var a [ ] uint32 var tcp * pkt . TcpHdr var ok bool var seq uint32 for i := range d { tcp , ok = d [ i ] . Headers [ pkt . TransportLayer ] . ( * pkt . TcpHdr ) if ! ok || tcp == nil { return t , a , ErrTransportLayerHeader } if tcp . Seq > seq { t = append ( t , d [ i ] . Time ) a = append ( a , tcp . Seq ) seq = tcp . Seq } } return t , a , nil }
SeqTimes returns the timestamps and sequence numbers that are strictly
increasing within d.
SeqTimes returns the timestamps and sequence numbers that are strictly increasing within d .