Theory of main resonances in directly modulated diode lasers