nic_router: API transition (fix 'deprecated' warnings)

Issue #1987
This commit is contained in:
Christian Prochaska 2017-01-13 19:38:23 +01:00 committed by Norman Feske
parent 9be07d2244
commit cdcfc120cb
5 changed files with 22 additions and 15 deletions

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -60,13 +60,14 @@ Net::Session_component::Session_component(Allocator &alloc,
Ram_session &buf_ram,
size_t const tx_buf_size,
size_t const rx_buf_size,
Region_map &region_map,
Mac_address const mac,
Entrypoint &ep,
Mac_address const &router_mac,
Domain &domain)
:
Session_component_base(alloc, amount, buf_ram, tx_buf_size, rx_buf_size),
Session_rpc_object(_tx_buf, _rx_buf, &_range_alloc, ep.rpc_ep()),
Session_rpc_object(region_map, _tx_buf, _rx_buf, &_range_alloc, ep.rpc_ep()),
Interface(ep, timer, router_mac, _guarded_alloc, mac, domain)
{
_tx.sigh_ready_to_ack(_sink_ack);
@ -98,10 +99,12 @@ Net::Root::Root(Entrypoint &ep,
Allocator &alloc,
Mac_address const &router_mac,
Configuration &config,
Ram_session &buf_ram)
Ram_session &buf_ram,
Region_map &region_map)
:
Root_component<Session_component>(&ep.rpc_ep(), &alloc), _timer(timer),
_ep(ep), _router_mac(router_mac), _config(config), _buf_ram(buf_ram)
_ep(ep), _router_mac(router_mac), _config(config), _buf_ram(buf_ram),
_region_map(region_map)
{ }
@ -138,7 +141,7 @@ Session_component *Net::Root::_create_session(char const *args)
}
return new (md_alloc())
Session_component(*md_alloc(), _timer, ram_quota - session_size,
_buf_ram, tx_buf_size, rx_buf_size,
_buf_ram, tx_buf_size, rx_buf_size, _region_map,
_mac_alloc.alloc(), _ep, _router_mac,
domain);
}

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -89,6 +89,7 @@ class Net::Session_component : public Session_component_base,
Genode::Ram_session &buf_ram,
Genode::size_t const tx_buf_size,
Genode::size_t const rx_buf_size,
Genode::Region_map &region_map,
Mac_address const mac,
Genode::Entrypoint &ep,
Mac_address const &router_mac,
@ -115,6 +116,7 @@ class Net::Root : public Genode::Root_component<Session_component>
Mac_address const _router_mac;
Configuration &_config;
Genode::Ram_session &_buf_ram;
Genode::Region_map &_region_map;
/********************
@ -130,7 +132,8 @@ class Net::Root : public Genode::Root_component<Session_component>
Genode::Allocator &alloc,
Mac_address const &router_mac,
Configuration &config,
Genode::Ram_session &buf_ram);
Genode::Ram_session &buf_ram,
Genode::Region_map &region_map);
};
#endif /* _COMPONENT_H_ */

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -49,8 +49,9 @@ Main::Main(Env &env)
:
_timer_connection(env), _timer(_timer_connection, env.ep()),
_heap(&env.ram(), &env.rm()), _config(config()->xml_node(), _heap),
_uplink(env.ep(), _timer, _heap, _config),
_root(env.ep(), _timer, _heap, _uplink.router_mac(), _config, env.ram())
_uplink(env, _timer, _heap, _config),
_root(env.ep(), _timer, _heap, _uplink.router_mac(), _config, env.ram(),
env.rm())
{
env.parent().announce(env.ep().manage(_root));
}

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -23,14 +23,14 @@ using namespace Net;
using namespace Genode;
Net::Uplink::Uplink(Entrypoint &ep,
Net::Uplink::Uplink(Env &env,
Genode::Timer &timer,
Genode::Allocator &alloc,
Configuration &config)
:
Nic::Packet_allocator(&alloc),
Nic::Connection(this, BUF_SIZE, BUF_SIZE),
Interface(ep, timer, mac_address(), alloc, Mac_address(),
Nic::Connection(env, this, BUF_SIZE, BUF_SIZE),
Interface(env.ep(), timer, mac_address(), alloc, Mac_address(),
config.domains().find_by_name(Cstring("uplink")))
{
rx_channel()->sigh_ready_to_ack(_sink_ack);

View File

@ -46,7 +46,7 @@ class Net::Uplink : public Nic::Packet_allocator,
public:
Uplink(Genode::Entrypoint &ep,
Uplink(Genode::Env &env,
Genode::Timer &timer,
Genode::Allocator &alloc,
Configuration &config);