Wood Eating Caterpillar?

I'm re-roofing a shed and have it torn down to the trusses. There's insect (termite?) damage to wood here and there, which is normal for anything in my yard (termites are eating the bushes around the house). I whacked a damaged piece of wood with a hammer and a bunch of millipede looking caterpillars crawled out! What are they?!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.