mirror of
https://github.com/cetic/unikernels.git
synced 2024-12-26 00:03:25 +07:00
18 lines
370 B
C++
18 lines
370 B
C++
/*
|
|
* This code is copied from the IncludeOS Router example.
|
|
*/
|
|
|
|
#include <service>
|
|
#include <net/router>
|
|
|
|
void Service::start()
|
|
{
|
|
auto& router = net::get_router();
|
|
|
|
auto& eth0 = net::Super_stack::get<net::IP4>(0);
|
|
auto& eth1 = net::Super_stack::get<net::IP4>(1);
|
|
|
|
eth0.set_forward_delg(router.forward_delg());
|
|
eth1.set_forward_delg(router.forward_delg());
|
|
}
|