Added IP recursion on C implementation