/*
- * Copyright (C) 2005-2014 Andre Noll <maan@tuebingen.mpg.de>
+ * Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file send.h Sender-related defines and structures. */
-/** The sender subcommands. */
+#define SENDER_SUBCOMMANDS \
+ SENDER_SUBCOMMAND(add) /**< Add a target (udp only). */ \
+ SENDER_SUBCOMMAND(delete) /**< Delete a target (udp only). */ \
+ SENDER_SUBCOMMAND(allow) /**< Allow connections from given IP address(es). */ \
+ SENDER_SUBCOMMAND(deny) /**< Deny connections from given IP address(es). */ \
+ SENDER_SUBCOMMAND(on) /**< Activate the sender. */ \
+ SENDER_SUBCOMMAND(off) /**< Deactivate the sender. */ \
+
+#define SENDER_SUBCOMMAND(_name) SENDER_ ## _name,
enum sender_subcommand {
- SENDER_ADD, /**< Add a target (udp only). */
- SENDER_DELETE, /**< Delete a target (udp only). */
- SENDER_ALLOW, /**< Allow connections from given IP address(es). */
- SENDER_DENY, /**< Deny connections from given IP address(es). */
- SENDER_ON, /**< Activate the sender. */
- SENDER_OFF, /**< Deactivate the sender. */
+ SENDER_SUBCOMMANDS
NUM_SENDER_CMDS /**< Used as array size in struct \ref sender. */
};
+#undef SENDER_SUBCOMMAND
+#define SENDER_SUBCOMMAND(_name) #_name,
/**
* Describes one supported sender of para_server.