How can an animal serve as a dofen?
(a) First, the animal cannot be made to stand still so we should make a gezerah that maybe the sukkah will fall.
(b) Secondly, we have k'en taduru. We do not have animals like cows living with us. The smell from the animal's secretions should disqualify it for k'en todoru.
(c) Finally, animals get fidgety and move when there are things like high winds. So it does not stay still even in a ruach mitzuya.
Yehuda Gellman , Yerushalayim
(a) The Gemara (23a) states that the animal must be tied, according to the opinion that is concerned that it might run away. The Halachah follows this opinion (Shulchan Aruch, Orach Chaim 630:11, and Mishnah Berurah #53).
1. In the times of the Gemara, it was common that animals lived in houses. Secretions can be cleaned up and it was evidently routine then to do so.
2. However, the Sefas Emes (23a) writes that if the elephant dies, the stench makes the Sukah invalid. He cites a proof from the Gemara earlier (beginning of 13a) that says that one may not use smelly herbs as Sechach because one might have to leave the Sukah due to the bad smell.
3. The Gemara later (26a) also mentions "Sircha d'Gargishta," which refers to a smelly substance which exempts one from being in the Sukah. The Rosh (2:12) writes that one may not make a Sukah in a place where one will be uncomfortable because of the smell. The Mishnah Berurah (629:38) writes that if the smell is so bad that a person cannot bear it, the Sukah is invalid mid'Oraisa because of "Teishvu k'Ein Taduru." The Mishnah Berurah (630:4) writes that this applies also if the bad smell comes from the walls, not just from the Sechach.
4. In the light of the above, the Halachah concerning an animal as a wall might differ today from the times of the Gemara because most people nowadays are not accustomed to living with animals.
5. Another source concerning the Halachah for cow secretions is the Mishnah Berurah (79:24) in the name of the Magen Avraham, who writes that standard secretions of domesticated animals, wild animals, and birds (apart from a few exceptions mentioned in Shulchan Aruch OC 79:5 who possess an extremely bad smell) -- even though they may have a bad smell when they leave the animal -- do not smell so bad, and their odor stops fairly quickly.
My wife reminded me that a few months ago we spent Shabbos on a Moshav here in Eretz Yisrael. There were cows on the Moshav, and their smell hit us hard as we entered the area of the Moshav. However, as the day progressed, we became used to the smell fairly quickly, and the smell was not so bad, if even noticeable at all. Accordingly, we may suggest that cow secretions are not a great disturbance to living in the Sukah.
(c) The answer to (a) also applies here because the animal must be tied in.