The rules don't differentiate between attacks made inside or outside of the animal, but as a GM I do.
In short the official answer is DR always applies.
Okay. I suppose that'd make qualities such as regeneration/fast healing especially potent for a creature with swallow whole, considering your weapon selection for getting out isn't all that big, and generally not very damaging.