zero padding

othe

New Member


Messages: 14

i want to zero pad some data to be sent. i want the zeros to be put in the end. for example that i want to zero pad the icmp data to be a total of 60 bytes. does anyone know how to do that?
 

aragon

Daemon

Reaction score: 278
Messages: 2,029

Post your C app without the padding functionality and I'm sure someone can show you how to make it do the padding...
 
I

iic2

Guest


Djn

Well-Known Member

Reaction score: 67
Messages: 392

If this is C, why not just malloc 60 bytes, bzero/memset them to 0, write the data into that area, and send off the entire 60 bytes?
 
Top