return 0;
}
+int sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path) {
+ assert_return(lease, -EINVAL);
+ assert_return(root_path, -EINVAL);
+
+ if (lease->root_path)
+ *root_path = lease->root_path;
+ else
+ return -ENOENT;
+
+ return 0;
+}
+
int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr) {
assert_return(lease, -EINVAL);
assert_return(addr, -EINVAL);
break;
+ case DHCP_OPTION_ROOT_PATH:
+ if (len >= 1) {
+ free(lease->root_path);
+ lease->root_path = strndup((const char *)option, len);
+ }
+
+ break;
+
case DHCP_OPTION_RENEWAL_T1_TIME:
if (len == 4) {
memcpy(&val, option, 4);
if (r >= 0)
fprintf(f, "HOSTNAME=%s\n", string);
+ r = sd_dhcp_lease_get_root_path(lease, &string);
+ if (r >= 0)
+ fprintf(f, "ROOT_PATH=%s\n", string);
+
r = 0;
fflush(f);
"MTU", &mtu,
"DOMAINNAME", &lease->domainname,
"HOSTNAME", &lease->hostname,
+ "ROOT_PATH", &lease->root_path,
NULL);
if (r < 0) {
if (r == -ENOENT)