What is the meaning of [Son of a Gun]

1) A rogue. 2) An exclamation of surprise.