read function call returning more amount of data than wiritten using write function
I am working on raw ether net sockets. Using write function call, I am writing the following data which is 18 bytes:
"01 02 03 04 05 06 00 00 00 00 00 1F 06 00 00 00 00 00"
But to my surprise, I am seeing that read funciton call is receiving 60 bytes of data which is as follows:
"01 02 03 04 05 06 00 00 00 00 00 1F 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
can some body please let me know why the padding is happening ? and how to get rid of that problem so that I get only the 18 bytes I have written using write function.
|