mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
lxip: allow network reconfiguration
This commit adds the public functions 'lxip_configure_static()' and 'lxip_configure_dhcp()' for reconfiguring the network.
This commit is contained in:
parent
8a6930ef5d
commit
8025f5f570
@ -514,6 +514,30 @@ int lxip_init(char const *address_config)
|
||||
}
|
||||
|
||||
|
||||
static void lxip_configure(char const *address_config)
|
||||
{
|
||||
__ip_auto_config_setup((char *)address_config);
|
||||
late_ip_auto_config();
|
||||
}
|
||||
|
||||
|
||||
void lxip_configure_static(char const *addr, char const *netmask,
|
||||
char const *gateway, char const *nameserver)
|
||||
{
|
||||
char address_config[128];
|
||||
snprintf(address_config, sizeof(address_config),
|
||||
"%s::%s:%s:::off:%s",
|
||||
addr, gateway, netmask, nameserver);
|
||||
lxip_configure(address_config);
|
||||
}
|
||||
|
||||
|
||||
void lxip_configure_dhcp()
|
||||
{
|
||||
lxip_configure("dhcp");
|
||||
}
|
||||
|
||||
|
||||
/******************
|
||||
** Lxip private **
|
||||
******************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user