xref: /freebsd/sys/contrib/rdma/krping/getopt.h (revision 02e9120893770924227138ba49df1edb3896112a)
1 /*
2  * lifted from fs/ncpfs/getopt.c
3  *
4  * $FreeBSD$
5  */
6 #ifndef _KRPING_GETOPT_H
7 #define _KRPING_GETOPT_H
8 
9 #define OPT_NOPARAM	1
10 #define OPT_INT		2
11 #define OPT_STRING	4
12 struct krping_option {
13 	const char *name;
14 	unsigned int has_arg;
15 	int val;
16 };
17 
18 extern int krping_getopt(const char *caller, char **options, const struct krping_option *opts,
19 		      char **optopt, char **optarg, unsigned long *value);
20 
21 #endif /* _KRPING_GETOPT_H */
22