code: func synSentStateInbound(t *TCB, tcp header.TCP) Result {
  	flags := tcp.Flags()
  	ackPresent := flags&header.TCPFlagAck != 0
  	ack := seqnum.Value(tcp.AckNumber())
  
  	// Ignore segment if ack is present but not acceptable.
  	if ackPresent && !(ack-1).InRange(t.outbound.una, t.outbound.nxt) {
  		return ResultConnecting
  	}
  
  	// If reset is specified, we will let the packet through no matter what
  	// but we will also destroy the connection if the ACK is present (and
  	// implicitly acceptable).
  	if flags&header.TCPFlagRst != 0 {
  		if ackPresent {
  			t.inbound.rstSeen = true
  			return ResultReset
  		}
  		return ResultConnecting
  	}
  
  	// Ignore segment if SYN is not set.
  	if flags&header.TCPFlagSyn == 0 {
  		return ResultConnecting
  	}
  
  	// Update state informed by this SYN.
  	irs := seqnum.Value(tcp.SequenceNumber())
  	t.inbound.una = irs
  	t.inbound.nxt = irs.Add(logicalLen(tcp))
  	t.inbound.end += irs
  
  	t.outbound.end = t.outbound.una.Add(seqnum.Size(tcp.WindowSize()))
  
  	// If the ACK was set (it is acceptable), update our unacknowledgement
  	// tracking.
  	if ackPresent {
  		// Advance the "una" and "end" indices of the outbound stream.
  		if t.outbound.una.LessThan(ack) {
  			t.outbound.una = ack
  		}
  
  		if end := ack.Add(seqnum.Size(tcp.WindowSize())); t.outbound.end.LessThan(end) {
  			t.outbound.end = end
  		}
  	}
  
  	// Update handlers so that new calls will be handled by new state.
  	t.handlerInbound = allOtherInbound
  	t.handlerOutbound = allOtherOutbound
  
  	return ResultAlive
  }
docs: // synSentStateInbound is the state handler for inbound segments when the
  // connection is in SYN-SENT state.