diff --git a/libifupdown/interface.c b/libifupdown/interface.c index 4035ff5..4f5eafb 100644 --- a/libifupdown/interface.c +++ b/libifupdown/interface.c @@ -84,7 +84,7 @@ count_set_bits(const char *netmask) } bool -lif_address_format_cidr(struct lif_interface *iface, struct lif_dict_entry *entry, char *buf, size_t buflen) +lif_address_format_cidr(const struct lif_interface *iface, struct lif_dict_entry *entry, char *buf, size_t buflen) { struct lif_address *addr = entry->data; size_t orig_netmask = addr->netmask; diff --git a/libifupdown/interface.h b/libifupdown/interface.h index 0b57b6c..c86efdc 100644 --- a/libifupdown/interface.h +++ b/libifupdown/interface.h @@ -67,7 +67,7 @@ struct lif_interface { extern bool lif_address_parse(struct lif_address *address, const char *presentation); extern bool lif_address_unparse(const struct lif_address *address, char *buf, size_t buflen, bool with_netmask); -extern bool lif_address_format_cidr(struct lif_interface *iface, struct lif_dict_entry *entry, char *buf, size_t buflen); +extern bool lif_address_format_cidr(const struct lif_interface *iface, struct lif_dict_entry *entry, char *buf, size_t buflen); extern void lif_interface_init(struct lif_interface *interface, const char *ifname); extern bool lif_interface_address_add(struct lif_interface *interface, const char *address);