code: func FindWndScale(wnd seqnum.Size) int {
  	if wnd < 0x10000 {
  		return 0
  	}
  
  	max := seqnum.Size(0xffff)
  	s := 0
  	for wnd > max && s < header.MaxWndScale {
  		s++
  		max <<= 1
  	}
  
  	return s
  }
docs: // FindWndScale determines the window scale to use for the given maximum window
  // size.