-/** \brief
- Used by a 'host' to enable the recption/listening of packets for a specific
- multicast group
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
- @param enable - if set, enable igmp messages on configuration
- @param sw_if_index - interface sw index
- @param saddr - source address
- @param gaddr - group address
-*/
+/**
+ * @brief Filter mode
+ */
+enum filter_mode {
+ EXCLUDE = 0,
+ INCLUDE = 1,
+};
+
+
+/**
+ * @brief
+ * Used by a 'host' to enable the reception/listening of packets for a specific
+ * multicast group
+ *
+ * For each socket on which IPMulticastListen has been invoked, the
+ * system records the desired multicast reception state for that socket.
+ * That state conceptually consists of a set of records of the form:
+ *
+ * (interface, multicast-address, filter-mode, source-list)
+ *
+ * The socket state evolves in response to each invocation of
+ * IPMulticastListen on the socket, as follows:
+ *
+ * o If the requested filter mode is INCLUDE *and* the requested source
+ * list is empty, then the entry corresponding to the requested
+ * interface and multicast address is deleted if present. If no such
+ * entry is present, the request is ignored.
+ *
+ * o If the requested filter mode is EXCLUDE *or* the requested source
+ * list is non-empty, then the entry corresponding to the requested
+ * interface and multicast address, if present, is changed to contain
+ * the requested filter mode and source list. If no such entry is
+ * present, a new entry is created, using the parameters specified in
+ * the request.
+ *
+ * @param client_index - opaque cookie to identify the sender
+ * @param context - sender context, to match reply w/ request
+ * @param sw_if_index - interface sw index
+ * @param filter - filter mode
+ * @param saddr - source address
+ * @param gaddr - group address
+ */
+typedef igmp_group
+{
+ vl_api_filter_mode_t filter;
+ u8 n_srcs;
+ vl_api_interface_index_t sw_if_index;
+ vl_api_ip4_address_t gaddr;
+ vl_api_ip4_address_t saddrs[n_srcs];
+};