dag_rx_get_stream_count(3)

NAME
dag_rx_get_stream_count, dag_tx_get_stream_count - retrieve the number of receive/transmit streams supported by an Endace DAG card

SYNOPSIS
#include "dagapi.h "

int
dag_rx_get_stream_count(int dagfd);

int
dag_tx_get_stream_count(int dagfd);

DESCRIPTION
dag_rx_get_stream_count and dag_tx_get_stream_count return the number of receive/transmits streams supported (a non-negative integer) by the currently loaded firmware on the DAG card.

RETURN VALUE
On success dag_rx_get_stream_count and dag_tx_get_stream_count return the number of receive/transmits streams supported (a non-negative integer), otherwise they return -1 with errno set appropriately.

ERRORS

EBADF
    dagfd is an invalid file descriptor.

NOTES
The presence of a receive or transmit stream, as indicated by the return value from these routines, does not imply that any or all of the streams have memory allocated to their buffers.

The same Endace DAG card may support different numbers of streams with different firmware images.

EXAMPLE
	#include "dagapi.h"

	...

	int rx_streams = dag_rx_get_stream_count(dagfd);
	int tx_streams = dag_tx_get_stream_count(dagfd);

	printf("This DAG card has %d receive stream(s) and %d transmit stream(s)., rx_streams, tx_streams);

SEE ALSO
dag_advance_stream(3), dag_attach_stream(3), dag_detach_stream(3), dag_get_stream_buffer_level(3), dag_get_stream_buffer_size(3), dag_get_stream_poll(3), dag_rx_stream_next_inline(3), dag_rx_stream_next_record(3), dag_set_stream_poll(3), dag_start_stream(3), dag_stop_stream(3).

BUGS
Report bugs to <support@endace.com>.

LAST UPDATED
$Author: koryn $
$Revision: 2474 $
$Date: 2005-11-10 11:13:19 +1300 (Thu, 10 Nov 2005) $

COPYRIGHT
(c) 2004-2005 Endace Technology, Hamilton, New Zealand. All Rights Reserved.