getopt.h revision 302408
1/*
2 * lifted from fs/ncpfs/getopt.c
3 *
4 * $FreeBSD: stable/11/sys/contrib/rdma/krping/getopt.h 178784 2008-05-05 18:35:55Z kmacy $
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
12struct krping_option {
13	const char *name;
14	unsigned int has_arg;
15	int val;
16};
17
18extern 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