+/** Define the user data structure for one command. */
+#define EXPORT_SERVER_CMD_HANDLER(_cmd) \
+ const struct server_cmd_user_data lsg_server_cmd_com_ ## _cmd ## _user_data = { \
+ .handler = com_ ## _cmd \
+ };
+
+/** Get the lopsub command pointer by command name. */
+#define SERVER_CMD_CMD_PTR(_cmd) \
+ (lls_cmd(LSG_SERVER_CMD_CMD_ ## _cmd, server_cmd_suite))
+
+/** Get the lopsub parse result of an option. */
+#define SERVER_CMD_OPT_RESULT(_cmd, _opt, _lpr) \
+ (lls_opt_result(LSG_SERVER_CMD_ ## _cmd ## _OPT_ ## _opt, _lpr))
+
+/** How many times an option was given. */
+#define SERVER_CMD_OPT_GIVEN(_cmd, _opt, _lpr) \
+ (lls_opt_given(SERVER_CMD_OPT_RESULT(_cmd, _opt, _lpr)))
+
+/** Fetch the (first) argument given to an option of type uint32. */
+#define SERVER_CMD_UINT32_VAL(_cmd, _opt, _lpr) \
+ (lls_uint32_val(0, SERVER_CMD_OPT_RESULT(_cmd, _opt, _lpr)))
+