#endif
};
+#ifdef INET
#define D_STATE(ifp) \
((struct dhcp_state *)(ifp)->if_data[IF_DATA_DHCP])
#define D_CSTATE(ifp) \
#include "dhcpcd.h"
#include "if-options.h"
-#ifdef INET
char *decode_rfc3361(const uint8_t *, size_t);
ssize_t decode_rfc3442(char *, size_t, const uint8_t *p, size_t);
void dhcp_close(struct interface *);
void dhcp_free(struct interface *);
int dhcp_dump(struct interface *);
-#else
-#define dhcp_start(a) {}
-#define dhcp_abort(a) {}
-#define dhcp_renew(a) {}
-#define dhcp_reboot(a, b) (b = b)
-#define dhcp_reboot_newopts(a, b) (b = b)
-#define dhcp_close(a) {}
-#define dhcp_free(a) {}
-#define dhcp_dump(a) (-1)
-#endif
+#endif /* INET */
-#endif
+#endif /* DHCP_H */
#ifdef ARP
arp_drop(ifp);
#endif
+#ifdef INET
dhcp_abort(ifp);
+#endif
ipv6nd_expire(ifp, 0);
dhcp6_abort(ifp);
#else
oldopts = ifp->options->options;
script_runreason(ifp, "RECONFIGURE");
dhcpcd_initstate1(ifp, argc, argv, 0);
+#ifdef INET
dhcp_reboot_newopts(ifp, oldopts);
+#endif
dhcp6_reboot(ifp);
dhcpcd_prestartinterface(ifp);
}
ifp->carrier == LINK_DOWN)
return;
+#ifdef INET
dhcp_renew(ifp);
+#endif
#define DHCPCD_RARENEW (DHCPCD_IPV6 | DHCPCD_IPV6RS)
if ((ifp->options->options & DHCPCD_RARENEW) == DHCPCD_RARENEW)
ipv6nd_startrs(ifp);
if (!ifp->active)
continue;
len++;
+#ifdef INET
if (D_STATE_RUNNING(ifp))
len++;
+#endif
#ifdef IPV4LL
if (IPV4LL_STATE_RUNNING(ifp))
len++;
configure_interface(ifp, ctx.argc, ctx.argv, 0);
i = 0;
if (family == 0 || family == AF_INET) {
+#ifdef INET
if (dhcp_dump(ifp) == -1)
i = -1;
+#else
+ if (family == AF_INET)
+ logerrx("No INET support");
+#endif
}
if (family == 0 || family == AF_INET6) {
if (dhcp6_dump(ifp) == -1)
#ifdef IPV4LL
ipv4ll_free(ifp);
#endif
+#ifdef INET
dhcp_free(ifp);
ipv4_free(ifp);
+#endif
dhcp6_free(ifp);
ipv6nd_free(ifp);
ipv6_free(ifp);
return -1;
if (si->carrier < ti->carrier)
return 1;
-
+#ifdef INET
if (D_STATE_RUNNING(si) && !D_STATE_RUNNING(ti))
return -1;
if (!D_STATE_RUNNING(si) && D_STATE_RUNNING(ti))
return 1;
+#endif
if (RS_STATE_RUNNING(si) && !RS_STATE_RUNNING(ti))
return -1;
if (!RS_STATE_RUNNING(si) && RS_STATE_RUNNING(ti))