summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index 0108af1..2f7dd25 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -159,6 +159,15 @@ struct lease {
char *hostname;
};
+enum {
+ LEASE_ATTR_IP,
+ LEASE_ATTR_MAC,
+ LEASE_ATTR_DUID,
+ LEASE_ATTR_HOSTID,
+ LEASE_ATTR_LEASETIME,
+ LEASE_ATTR_NAME,
+ LEASE_ATTR_MAX
+};
struct odhcpd_ref_ip;
@@ -315,6 +324,7 @@ struct interface {
};
extern struct avl_tree interfaces;
+extern const struct blobmsg_policy lease_attrs[LEASE_ATTR_MAX];
inline static void free_assignment(struct dhcp_assignment *a)
{
@@ -375,6 +385,7 @@ struct lease *config_find_lease_by_duid(const uint8_t *duid, const uint16_t len)
struct lease *config_find_lease_by_mac(const uint8_t *mac);
struct lease *config_find_lease_by_hostid(const uint32_t hostid);
struct lease *config_find_lease_by_ipaddr(const uint32_t ipaddr);
+int set_lease_from_blobmsg(struct blob_attr *ba);
#ifdef WITH_UBUS
int ubus_init(void);