I was confused by the same problem. It can be solve like this.
in lib wpcap
there is a function named pcap_findalldevs();
use it like this and you will succuss
int Value = pcap_findalldevs(&alldevs,errbuf);
if( Value == -1)
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
exit(1);
}
char *device = NULL;
device = alldevs->name; //get the first Card name
libnet_t *l
l = libnet_init(
LIBNET_LINK_ADV,
device,//use it here
error_information);
may this help you. good luck!