Skip to content

Commit

Permalink
connection-manager: updated the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Jun 2, 2023
1 parent 642de99 commit ad53b5d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/network-spec/connection-manager.tex
Expand Up @@ -126,6 +126,7 @@ \chapter{Connection Manager State Machine Specification}
\def\CommitUniLoc{\textsf{Commit}\textsuperscript{\textsf{Unidirectional}}\textsubscript{\textsf{Local}}}
\def\Terminate{\textsf{Terminate}}
\def\Timeout{\textsf{Timeout}}
\def\SelfConn{\textsf{SelfConn}}

% Inbound governor states
\def\RemoteEstablished{\textsf{RemoteEstablished}}
Expand Down Expand Up @@ -649,9 +650,11 @@ \subsection{Connection states}\label{sec:connection-state}
\draw[->] (OutboundStateUni.190) to [out=270, in=90,pos=0.23,looseness=2]
node[fill=white,rotate=88,pos=0.3]{\small\DemotedToColdUniLoc} (OutboundIdleStateUni.173);

\draw[->] (OutboundIdleStateUni) to [out=300, in=180] node[fill=white,below left]{\CommitUniLoc} (TerminatingState.180);
\draw[->] (OutboundIdleStateUni) to [out=300, in=180] node[fill=white,below left]{\CommitUniLoc} (TerminatingState.180);
\draw[->] (OutboundIdleStateDup.280) -- node[fill=white,pos=.4]{\CommitDupLoc} (TerminatingState.40);
\draw[->] (TerminatingState) -- node[left]{\Terminate} (TerminatedState);

\draw[->] (UnnegotiatedStateOut) -- node[above]{\small\SelfConn} (UnnegotiatedStateIn);
\end{tikzpicture}}
\caption{\textit{Outbound} (blue \& violet) and \textit{inbound} (green \&
violet) connection states and allowed transitions.}
Expand Down Expand Up @@ -770,6 +773,15 @@ \subsubsection{\Accepted{} and \Overwritten{}}
time, in which case it would re-use the accepted connection (assuming that
a duplex connection was negotiated).

\subsubsection{\SelfConn{}}

We allow to transition from \UnnegotiatedStateOut{} to \UnnegotiatedStateIn{}.
This can only be done when the connection manager was requested to connect to
its own socket. There is no way to detect these kind of misconfigurations.
This transition is not guaranteed as on some systems in such case the outbound
and inbound addresses (as returned by the \texttt{accept} call) can be
different.

\subsubsection{\NegotiatedUniOut{} and \NegotiatedDupOut{}}
Once an outbound connection has been negotiated one of \NegotiatedUniOut{} or
\NegotiatedDupOut{} transition is performed, depending on the result of handshake
Expand Down Expand Up @@ -1626,6 +1638,8 @@ \subsubsection{Connection manager methods}
\draw[->, unregisterOutboundArr] (OutboundIdleStateDup.280) -- node[fill=white,pos=.4]{\CommitDupLoc} (TerminatingState.40);
\draw[->] (TerminatingState) -- node[left]{\Terminate} (TerminatedState);

\draw[->, registerInboundArr] (UnnegotiatedStateOut) -- node[above]{\small\SelfConn} (UnnegotiatedStateIn);

\end{tikzpicture}
\caption{Transitions classified by connection manager method.}
\label{fig:methods}
Expand Down

0 comments on commit ad53b5d

Please sign in to comment.