unsigned char * buffer = (unsigned char*)malloc(1514);
is stdlib.h included (i'm asking for sure)?
if (buffer = NULL) {
if (buffer == NULL) {
fprintf (stderr, "No memory available.\n");
close (tapFD);
exit(3);
}
When I replace the malloc with an automatic array, the
error goes away and I get the data I am looking for. i.e.:
unsigned char buffer[1514];
So why can't I use malloc to create that buffer?
anyway not using malloc is good habit :) but it should work anyway.
try
buffer[0]=buffer[1513]=0;
to make sure page is actually allocated.
if this help - maybe tap driver is buggy.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"