c++ - a write() to tun/tap interface returns "invalid argument" -


i have created , attached tap interface. can read interface no problem. trying write fails reporting "invalid argument". code follows :

int tapinterface::write(char *buf, int n) {   int nwrite;   if((nwrite=::write(this->my_tap_fd, buf, n))<0)  {    qdebug("writing data") ;    perror("error:");    exit(1);   }   return nwrite; } .... .... qbytearray txdata("hello"); write(txdata.data(), txdata.length()); 

any help?


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -