1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation.
3 * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
7 #ifndef _PARSE_ETHERADDR_H_
8 #define _PARSE_ETHERADDR_H_
10 #include <cmdline_parse.h>
16 struct cmdline_token_etheraddr {
17 struct cmdline_token_hdr hdr;
19 typedef struct cmdline_token_etheraddr cmdline_parse_token_etheraddr_t;
21 extern struct cmdline_token_ops cmdline_token_etheraddr_ops;
23 int cmdline_parse_etheraddr(cmdline_parse_token_hdr_t *tk, const char *srcbuf,
24 void *res, unsigned ressize);
25 int cmdline_get_help_etheraddr(cmdline_parse_token_hdr_t *tk, char *dstbuf,
28 #define TOKEN_ETHERADDR_INITIALIZER(structure, field) \
32 &cmdline_token_etheraddr_ops, /* ops */ \
33 offsetof(structure, field), /* offset */ \
42 #endif /* _PARSE_ETHERADDR_H_ */