obj-$(CONFIG_LNET) += lnet.o
-lnet-y := api-ni.o config.o \
+lnet-y := api-ni.o config.o nidstrings.o \
lib-me.o lib-msg.o lib-eq.o lib-md.o lib-ptl.o \
lib-socket.o lib-move.o module.o lo.o \
router.o router_proc.o acceptor.o peer.o
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
- * libcfs/libcfs/nidstrings.c
+ * lnet/lnet/nidstrings.c
*
* Author: Phil Schwan <phil@clusterfs.com>
*/
#include "../../include/linux/libcfs/libcfs.h"
#include "../../include/linux/lnet/lnet.h"
+/* max value for numeric network address */
+#define MAX_NUMERIC_VALUE 0xffffffff
+
/* CAVEAT VENDITOR! Keep the canonical string representation of nets/nids
* consistent in all conversion functions. Some code fragments are copied
* around for the sake of clarity...
{
spin_lock_init(&libcfs_nidstring_lock);
}
+EXPORT_SYMBOL(libcfs_init_nidstrings);
-static char *
+char *
libcfs_next_nidstring(void)
{
- char *str;
- unsigned long flags;
+ char *str;
+ unsigned long flags;
spin_lock_irqsave(&libcfs_nidstring_lock, flags);
spin_unlock_irqrestore(&libcfs_nidstring_lock, flags);
return str;
}
+EXPORT_SYMBOL(libcfs_next_nidstring);
static int libcfs_lo_str2addr(const char *str, int nob, __u32 *addr)
{
libcfs-linux-objs := $(addprefix linux/,$(libcfs-linux-objs))
-libcfs-all-objs := debug.o fail.o nidstrings.o module.o tracefile.o \
+libcfs-all-objs := debug.o fail.o module.o tracefile.o \
libcfs_string.o hash.o kernel_user_comm.o \
prng.o workitem.o libcfs_cpu.o \
libcfs_mem.o libcfs_lock.o
res->ls_len = end - res->ls_str + 1;
return 1;
}
+EXPORT_SYMBOL(cfs_gettok);
/**
* Converts string to integer.
return (*num >= min && *num <= max);
}
+EXPORT_SYMBOL(cfs_str2num_check);
/**
* Parses \<range_expr\> token of the syntax. If \a bracketed is false,
return 0;
}
+EXPORT_SYMBOL(cfs_expr_list_match);
/**
* Convert express list (\a expr_list) to an array of all matched values
cfs_expr_list_free(el);
}
}
+EXPORT_SYMBOL(cfs_expr_list_free_list);
int
cfs_ip_addr_parse(char *str, int len, struct list_head *list)