Swamp slug

Swamp slugs were a species of creature native to the swamps of the planet Dagobah. Their oesophagus were filled with thousands of teeth capable of grinding up plants and animals, but not suitable for swallowing droids.

Behind the scenes
Star Wars: Absolutely Everything You Need to Know incorrectly states that it is a swamp slug that swallows R2-D2 when he first Dagobah, whereas it is in fact a dragonsnake.