Magnetic interactions in diluted magnetic semiconductors