#include "dagnew.h"
#include "dagapi.h"
+#include "dagpci.h"
#include "pcap-dag.h"
char dagname[DAGNAME_BUFSIZE];
int dagstream;
int dagfd;
+ dag_card_inf_t *inf;
+ char *description;
/* Try all the DAGs 0-DAG_MAX_BOARDS */
for (c = 0; c < DAG_MAX_BOARDS; c++) {
{
return -1;
}
+ description = NULL;
if ( (dagfd = dag_open(dagname)) >= 0 ) {
- if (pcap_add_if(devlistp, name, 0, NULL, errbuf) == -1) {
+ if ((inf = dag_pciinfo(dagfd)))
+ description = dag_device_name(inf->device_code, 1);
+ if (pcap_add_if(devlistp, name, 0, description, errbuf) == -1) {
/*
* Failure.
*/
dag_detach_stream(dagfd, stream);
snprintf(name, 10, "dag%d:%d", c, stream);
- if (pcap_add_if(devlistp, name, 0, NULL, errbuf) == -1) {
+ if (pcap_add_if(devlistp, name, 0, description, errbuf) == -1) {
/*
* Failure.
*/