Whamcloud - gitweb
1f8be10ca4b87b663b84d37f7d1c0b8e610f1b3b
[fs/lustre-release.git] / lnet / include / lnet / nidstr.h
1 #ifndef _LNET_NIDSTRINGS_H
2 #define _LNET_NIDSTRINGS_H
3 #include <lnet/types.h>
4
5 struct list_head;
6
7 #define LNET_NIDSTR_COUNT  1024    /* # of nidstrings */
8 #define LNET_NIDSTR_SIZE   32      /* size of each one (see below for usage) */
9
10 /* support decl needed both by kernel and liblustre */
11 int libcfs_isknown_lnd(int type);
12 char *libcfs_lnd2modname(int type);
13 char *libcfs_lnd2str(int type);
14 int libcfs_str2lnd(const char *str);
15 char *libcfs_net2str(__u32 net);
16 char *libcfs_nid2str(lnet_nid_t nid);
17 __u32 libcfs_str2net(const char *str);
18 lnet_nid_t libcfs_str2nid(const char *str);
19 int libcfs_str2anynid(lnet_nid_t *nid, const char *str);
20 char *libcfs_id2str(lnet_process_id_t id);
21 void cfs_free_nidlist(struct list_head *list);
22 int cfs_parse_nidlist(char *str, int len, struct list_head *list);
23 int cfs_print_nidlist(char *buffer, int count, struct list_head *list);
24 int cfs_match_nid(lnet_nid_t nid, struct list_head *list);
25 bool cfs_nidrange_is_contiguous(struct list_head *nidlist);
26 void cfs_nidrange_find_min_max(struct list_head *nidlist, char *min_nid,
27                                char *max_nid, int nidstr_length);
28 void libcfs_init_nidstrings(void);
29
30 #endif /* _LNET_NIDSTRINGS_H */