This should replace all manual poking of the next chain. Prefer the macros over the functions since they'll do your casting for you.