Ljh684/moonnet-lab/src/tcp does not have a README file
pub(open) trait CongestionControl {
fn window(Self) -> Int
fn ssthresh(Self) -> Int
fn name(Self) -> String
fn phase(Self) -> String
fn on_ack(Self, acked_bytes : Int, mss : Int, rtt_ps : Int64, now_ps : Int64) -> Unit
fn on_fast_retransmit(Self, flight_size : Int, mss : Int) -> Unit
fn on_duplicate_ack(Self, mss : Int) -> Unit
fn on_recovery_exit(Self, mss : Int) -> Unit
fn on_partial_ack(Self, mss : Int) -> Unit
fn on_timeout(Self, flight_size : Int, mss : Int) -> Unit
}pub struct Cubic {
mss : Int
cwnd : Int
ssthresh : Int
w_max : Int
cwnd_prior : Int
epoch_start : Int64
origin : Int
k_ps : Int64
w_est : Double
counter : Int
rtt_ps : Int64
in_recovery : Bool
fast_convergence : Bool
} W(t) = C * (t - K)^3 + W_maxtype InFlightpub(all) struct LinkPair {
client : TcpConnection
server : TcpConnection
up : Link[Segment]
down : Link[Segment]
}pub struct NoCongestionControl {
limit : Int
}pub struct Reno {
cwnd : Int
ssthresh : Int
in_recovery : Bool
}pub struct TcpConnection {
config : TcpConfig
cc : &CongestionControl
flow : UInt64
state : TcpState
emit : (Segment) -> Unit
snd_una : Seq
snd_nxt : Seq
rcv_nxt : Seq
peer_window : Int
send_queue : Bytes
send_offset : Int
fin_seq : Seq?
peer_fin : Bool
inflight : Array[InFlight]
inflight_head : Int
reorder : Array[Buffered]
reorder_bytes : Int
capture : Bool
delivered_bytes : Int
delivered : Bytes
has_delivered_chunk : Bool
last_delivery_ps : Int64
max_delivery_gap_ps : Int64
segments_sent : Int
segments_received : Int
bytes_sent : Int
bytes_acked : Int
duplicate_acks : Int
retransmits : Int
fast_retransmits : Int
timeouts : Int
consecutive_timeouts : Int
dup_ack_count : Int
in_recovery : Bool
recover_until : Seq
rtt_samples : Int
srtt_ps : Double
rttvar_ps : Double
has_rtt_sample : Bool
rto : Time
timer_running : Bool
timer_generation : Int
tlp_probe_pending : Bool
tlp_probe_end : Seq?
tlp_probes : Int
tlp_timer_running : Bool
tlp_timer_generation : Int
}fn header_bytes() -> Intfn initial_window(mss : Int) -> IntInstall
Download zipDeterministic packet-level network simulator and TCP congestion-control lab for MoonBit