This passage gives a metaphor, a hungry wolf prowling outside a sheepfold, wanting to get to the sheep safe within. This is a metaphor for an attacking army, prowling outside the walls of a defended city, trying to find a way to penetrate its defenses.

just like a wolf lurking in ambush outside a sheep foldwhen he howls at the rails enduring wind and rainsin the middle of the night; the lambs safe under the motherssound their bleatings; savage and greedy he [the wolf]

"He rages against the absent/inaccessible lambs (absentis - masc. acc. pl.); his frenzy for eating (edendi ... rabies), built up (collecta - fem. nom. sg. agreeing with rabies) over a long period of time (ex longo), torments him (fatigat), and his jaws, dry of blood (also torment him)."

Also possible: "his built-up frenzy for eating after a long time" (taking ex longo more closely with edendi). I think it doesn't matter precisely how you take it, because poets often transfer modifiers from one thing to a closely related thing, but the idea remains the same.