struct list_head head;
struct list_head lease_list;
+ void (*dhcp_free_cb)(struct dhcp_assignment *a);
+
struct interface *iface;
struct lease *lease;
#define RA_MANAGED_MFLAG 1
#define RA_MANAGED_NO_AFLAG 2
+inline static void free_assignment(struct dhcp_assignment *a)
+{
+ if (a->head.next)
+ list_del(&a->head);
+
+ if (a->lease_list.next)
+ list_del(&a->lease_list);
+
+ if (a->dhcp_free_cb)
+ a->dhcp_free_cb(a);
+
+ free(a->hostname);
+ free(a);
+}
// Exported main functions
int odhcpd_register(struct odhcpd_event *event);
void dhcpv6_ia_enum_addrs(struct interface *iface, struct dhcp_assignment *c, time_t now,
dhcpv6_binding_cb_handler_t func, void *arg);
void dhcpv6_ia_write_statefile(void);
-void dhcpv6_ia_free_assignment(struct dhcp_assignment *c);
int netlink_add_netevent_handler(struct netevent_handler *hdlr);
ssize_t netlink_get_interface_addrs(const int ifindex, bool v6,
int ndp_init(void);
#ifdef DHCPV4_SUPPORT
int dhcpv4_init(void);
-void dhcpv4_free_assignment(struct dhcp_assignment *a);
int dhcpv4_setup_interface(struct interface *iface, bool enable);
#endif