diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index e375060a9..3167c668d 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -1310,7 +1310,7 @@ int devname2ipaddr(char *dev, struct in_addr *addr) { /* Looks for an interface with the given name (iname), and returns the corresponding interface_info if found. Will accept a match of devname or devfullname. Returns NULL if none found */ -struct interface_info *getInterfaceByName(char *iname) { +struct interface_info *getInterfaceByName(const char *iname) { struct interface_info *ifaces; int numifaces = 0; int ifnum; diff --git a/libnetutil/netutil.h b/libnetutil/netutil.h index 3e5837982..5e5b55f89 100644 --- a/libnetutil/netutil.h +++ b/libnetutil/netutil.h @@ -320,7 +320,7 @@ struct dnet_collector_route_nfo { /* Looks for an interface with the given name (iname), and returns the corresponding interface_info if found. Will accept a match of devname or devfullname. Returns NULL if none found */ -struct interface_info *getInterfaceByName(char *iname); +struct interface_info *getInterfaceByName(const char *iname); /* Parse the system routing table, converting each route into a sys_route entry. Returns an array of sys_routes. numroutes is set