+static void search_to_env(const char *name, const uint8_t *start, size_t len)
+{
+ size_t buf_len = strlen(name);
+ char *buf = realloc(NULL, buf_len + 2 + len);
+ char *c = mempcpy(buf, name, buf_len);
+ *c++ = '=';
+
+ for (struct odhcp6c_entry *e = (struct odhcp6c_entry*)start;
+ (uint8_t*)e < &start[len] && &e->auxtarget[e->auxlen] <= &start[len];
+ e = (struct odhcp6c_entry*)(&e->auxtarget[e->auxlen])) {
+ c = mempcpy(c, e->auxtarget, e->auxlen);
+ *c++ = ' ';
+ }
+
+ c[-1] = '\0';
+ putenv(buf);
+}
+
+