Refactor/router getinterfaces common logic