calculateSegmentSize

Calculate the optimal segment size based on the negotiated MTU.

AC device selection algorithm:

  • If MTU >= 512 -> use 488 (standard segments)

  • If MTU >= 268 -> use 244 (half-size segments)

  • Otherwise -> use MTU - 24 (available space after overhead)

Return

The segment size to use for fragmentation

Parameters

mtu

The negotiated ATT MTU value