/* The file containing the packet location definitions is automatically re-read if its modification time has changed since the last call. */
int rtnl_pktloc_lookup(const char *name, struct rtnl_pktloc **result)
/* The file containing the packet location definitions is automatically re-read if its modification time has changed since the last call. */
int rtnl_pktloc_lookup(const char *name, struct rtnl_pktloc **result)
{
	struct rtnl_pktloc *loc;
	int hash, err;
	if ((err = read_pktlocs()) < 0)
		return err;
	hash = pktloc_hash(name);
	nl_list_for_each_entry(loc, &pktloc_name_ht[hash], list) {
		if (!strcasecmp(loc->name, name)) {
			*result = loc;
			return 0;
		}
	}
	return -NLE_OBJ_NOTFOUND;
}