pub fn resolve(path: &str) -> Option<(u64, String)>
Resolve a path to the longest matching prefix.
Returns (port_id, remaining_path).