The Pilgrimage - 22:30 Thus it is. Whoever respects the prohibitions of Allah, it is better for him with his Lord. All livestock has been made lawful, except those specifically prescribed for you. So avoid the calamity of idolatry and beware of falsehood.
Specifically forbidden farm animals:
The Cattle/6:145 "Say: "I do not find in what has been revealed to me anything forbidden for anyone who eats, except: carrion, spilled blood, the flesh of swine, which is unclean, and food devoted to none but Allah."And if anyone who is in hardship does not overstep the limit, then surely your Lord is Forgiving, Merciful."

The Bee/16:115 He has forbidden you only carrion, blood, pork and that which is dedicated to none but Allah. And whoever is compelled to eat them, Allah is Forgiving, Merciful, provided he does not desire them and does not exceed the limit.

The Cow/2:173 He has forbidden you only carrion, blood, pork and what is slaughtered in the name of none but Allah. Whoever is compelled (to eat them) does not commit a sin, provided he does not seek (a way of abuse) and does not exceed the limit. Allah is Forgiving, Merciful.