Routing and flow control in data networks