From: Simon Kuenzer Date: Wed, 6 Dec 2023 15:07:23 +0000 (+0100) Subject: init: Update to new uknetdev einfo field names X-Git-Tag: RELEASE-0.16.2~11 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8b4e7544a1dd0ea6c507c0d3c84134275e05406e;p=unikraft%2Flibs%2Flwip.git init: Update to new uknetdev einfo field names [PR#1211](https://github.com/unikraft/unikraft/pull/1211) in Unikraft core changes `uk_netdev_einfo_get()` to return C-strings only and removed the `_STR` name suffix of the fields that we are using to setup a statically assigned IPv4 address. Signed-off-by: Simon Kuenzer Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu GitHub-Closes: #42 --- diff --git a/init.c b/init.c index 5aa0b4f..3402380 100644 --- a/init.c +++ b/init.c @@ -203,7 +203,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused) gw4_arg = NULL; /* IP */ - strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_ADDR_STR); + strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_ADDR); if (strcfg) { if (ip4addr_aton(strcfg, &ip4) != 1) { uk_pr_err("Error converting IP address: %s\n", @@ -215,7 +215,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused) ip4_arg = &ip4; /* mask */ - strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_MASK_STR); + strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_MASK); if (strcfg) { if (ip4addr_aton(strcfg, &mask4) != 1) { uk_pr_err("Error converting net mask: %s\n", @@ -228,7 +228,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused) mask4_arg = &mask4; /* gateway */ - strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_GW_STR); + strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_GW); if (strcfg) { if (ip4addr_aton(strcfg, &gw4) != 1) { uk_pr_err("Error converting gateway: %s\n",