Network Coding in Multi-Layer Networks