"""
<Description>
  Holds global constants.

  Some of these should be made locals or 
  gotten rid of in the future.
"""

DEFAULT_MAXDGRAMSIZE = 1000 # MSS
DEFAULT_RETRIES = 4 # listen times for ack
DEFAULT_TIMEOUT = 1 # seconds to wait

MSS = 1000 # bytes maximum payload                
CONG_WINDOW_SIZE = MSS  #  increment up to ad window
AD_WINDOW_SIZE = 1000 * MSS # start out free buffer space
WINDOW_SIZE = AD_WINDOW_SIZE # alias


# State machine outputs
(OP_RCV_REMOTE_SYN, OP_RCV_LOOPBACK_SYN, \
 OP_RCV_SYNACK, OP_RCV_PAYLOADACK, \
 OP_RCV_ACK, OP_RCV_PAYLOAD, \
 OP_RCV_NONE, OP_RCV_FIN, \
 OP_RCV_ACK_FIN, OP_RCV_FINACK) = range(0, 10)


# config contants
THREE_WAY = 0
FOUR_WAY = 1
