[PATCH v2 05/33] ns: move to_ns_common() to ns_common.h