F
fabrizio
Opening /dev/tap0, I have an error in fact open() returns -1.
int fd = open("/dev/tap0",O_RDWR);
if (fd == -1)
{
cerr<<"error opening interface"<<endl;
}
How can I handle the error? Essentially, how can I print the error to
know the reason of it?
Thanks.
int fd = open("/dev/tap0",O_RDWR);
if (fd == -1)
{
cerr<<"error opening interface"<<endl;
}
How can I handle the error? Essentially, how can I print the error to
know the reason of it?
Thanks.