If you hear (or smell) some livestock next door, it might not be a violation of city ordinance. Here’s what to know.