
#include <xorp_config.h>

/*
 * Multicast Forwarding Engine Abstraction client XRL interface.
 */


interface mfea_client/0.1 {
	/**
	 * Receive a kernel signal message from the MFEA.
	 *
	 * @param xrl_sender_name the XRL name of the originator of this XRL.
	 * (both sides must agree on the particular values).
	 * @param message_type the type of the kernel signal message (TODO:
	 * integer for now: the particular types are well-known by both sides).
	 * @param vif_name the name of the vif the message was received on.
	 * @param vif_index the index of the vif the message was received on.
	 * @param source_address the address of the sender.
	 * @param dest_address the destination address.
	 * @param protocol_message the protocol message.
	 */
	recv_kernel_signal_message4	? xrl_sender_name:txt		\
					& message_type:u32		\
					& vif_name:txt & vif_index:u32	\
					& source_address:ipv4		\
					& dest_address:ipv4		\
					& protocol_message:binary;
	
	/**
	 * A signal that a dataflow-related pre-condition is true.
	 *
	 * @param xrl_sender_name the XRL name of the originator of this XRL.
	 * @param source_address the source address of the dataflow.
	 * @param group_address the group address of the dataflow.
	 * @param threshold_interval_sec the number of seconds in the
	 * interval requested for measurement.
	 * @param threshold_interval_usec the number of microseconds in the
	 * interval requested for measurement.
	 * @param measured_interval_sec the number of seconds in the
	 * last measured interval that has triggered the signal.
	 * @param measured_interval_usec the number of microseconds in the
	 * last measured interval that has triggered the signal.
	 * @param threshold_packets the threshold value to trigger a signal
	 * (in number of packets).
	 * @param threshold_bytes the threshold value to trigger a signal
	 * (in bytes).
	 * @param measured_packets the number of packets measured within the
	 * measured interval.
	 * @param measured_bytes the number of bytes measured within the
	 * measured interval.
	 * @param is_threshold_in_packets if true, threshold_packets
	 * is valid.
	 * @param is_threshold_in_bytes if true, threshold_bytes
	 * is valid.
	 * @param is_geq_upcall if true, the operation for comparison is ">=".
	 * @param is_leq_upcall if true, the operation for comparison is "<=".
	 */
	recv_dataflow_signal4	? xrl_sender_name:txt			\
				& source_address:ipv4			\
				& group_address:ipv4			\
				& threshold_interval_sec:u32		\
				& threshold_interval_usec:u32		\
				& measured_interval_sec:u32		\
				& measured_interval_usec:u32		\
				& threshold_packets:u32			\
				& threshold_bytes:u32			\
				& measured_packets:u32			\
				& measured_bytes:u32			\
				& is_threshold_in_packets: bool		\
				& is_threshold_in_bytes: bool		\
				& is_geq_upcall:bool			\
				& is_leq_upcall: bool;

#ifdef HAVE_IPV6
	recv_kernel_signal_message6	? xrl_sender_name:txt		\
					& message_type:u32		\
					& vif_name:txt & vif_index:u32	\
					& source_address:ipv6		\
					& dest_address:ipv6		\
					& protocol_message:binary;

	recv_dataflow_signal6	? xrl_sender_name:txt			\
				& source_address:ipv6			\
				& group_address:ipv6			\
				& threshold_interval_sec:u32		\
				& threshold_interval_usec:u32		\
				& measured_interval_sec:u32		\
				& measured_interval_usec:u32		\
				& threshold_packets:u32			\
				& threshold_bytes:u32			\
				& measured_packets:u32			\
				& measured_bytes:u32			\
				& is_threshold_in_packets: bool		\
				& is_threshold_in_bytes: bool		\
				& is_geq_upcall:bool			\
				& is_leq_upcall:bool;
#endif //ipv6
}
