set(EXT_LINK ${EXT_LINK} ubus)
endif(${UBUS})
-if (${DHCPV4_SUPPORT})
- add_definitions(-DDHCPV4_SUPPORT)
- set(EXT_SRC ${EXT_SRC} src/dhcpv4.c)
-endif(${DHCPV4})
-
-add_executable(odhcpd src/odhcpd.c src/config.c src/router.c src/dhcpv6.c src/ndp.c src/dhcpv6-ia.c ${EXT_SRC})
+add_executable(odhcpd src/odhcpd.c src/config.c src/router.c src/dhcpv6.c src/ndp.c src/dhcpv6-ia.c src/dhcpv4.c ${EXT_SRC})
target_link_libraries(odhcpd resolv ubox uci ${libnl} ${EXT_LINK})
# Installation
setup_router_interface(iface, false);
setup_dhcpv6_interface(iface, false);
setup_ndp_interface(iface, false);
-#ifdef DHCPV4_SUPPORT
setup_dhcpv4_interface(iface, false);
-#endif
clean_interface(iface);
free(iface);
setup_router_interface(i, !i->ignore || i->ra != RELAYD_DISABLED);
setup_dhcpv6_interface(i, !i->ignore || i->dhcpv6 != RELAYD_DISABLED);
setup_ndp_interface(i, !i->ignore || i->ndp != RELAYD_DISABLED);
-#ifdef DHCPV4_SUPPORT
setup_dhcpv4_interface(i, !i->ignore || i->dhcpv4 != RELAYD_DISABLED);
-#endif
} else
close_interface(i);
}
if (init_ndp())
return 4;
-#ifdef DHCPV4_SUPPORT
if (init_dhcpv4())
return 4;
-#endif
odhcpd_run();
return 0;
// Exported module initializers
int init_router(void);
int init_dhcpv6(void);
-#ifdef DHCPV4_SUPPORT
int init_dhcpv4(void);
-#endif
int init_ndp(void);
int setup_router_interface(struct interface *iface, bool enable);
int setup_dhcpv6_interface(struct interface *iface, bool enable);
int setup_ndp_interface(struct interface *iface, bool enable);
-#ifdef DHCPV4_SUPPORT
int setup_dhcpv4_interface(struct interface *iface, bool enable);
-#endif
void odhcpd_reload(void);