The dog might have suffered a bite of some kind.

NQK is right that dex will relieve swelling, but if there is an infection, dex will also weaken the immune response.

Because of this, the prophylactic use of cephalexin wouldn't hurt ...

Jack