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);

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.


to make sure page is actually allocated.

if this help - maybe tap driver is buggy.
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to