/* Returns the offset of the first Marker in a FPDU where the beginning of a FPDU has an offset of 0. It also addresses possible sequence number overflows. The endpoint is either the Initiator or the Responder.  */
static guint32 get_first_marker_offset(mpa_state_t *state, struct tcpinfo *tcpinfo, guint8 endpoint)
/* Returns the offset of the first Marker in a FPDU where the beginning of a FPDU has an offset of 0. It also addresses possible sequence number overflows. The endpoint is either the Initiator or the Responder.  */
static guint32 get_first_marker_offset(mpa_state_t *state, struct tcpinfo *tcpinfo, guint8 endpoint)
{
	guint32 offset = 0;
	if (tcpinfo->seq > state->minfo[endpoint].seq) {
		offset = (tcpinfo->seq - state->minfo[endpoint].seq)
		% MPA_MARKER_INTERVAL;
	}
	if (tcpinfo->seq < state->minfo[endpoint].seq) {
		offset = state->minfo[endpoint].seq
		+ (TCP_MAX_SEQ - tcpinfo->seq) % MPA_MARKER_INTERVAL;
	}
	return (MPA_MARKER_INTERVAL - offset) % MPA_MARKER_INTERVAL;
}