now i need to store data from a input buffer in a struct
Then this struct better have a buffer within it big enough to store the data from the input buffer.
then sending the struct back
Which shipping company are you using to send the struct back? I hear UPS is really bad, but FedEx is quite good if not more expensive.
new question. is there any way to get the size of, or indexing a void type buffer?
Void is not a type so much as a lack of type. You can’t declare something of type void. If you have a void pointer, you can’t do any dereference operations, or get the size, as it is typeless.
or now, i malloced some space and put all the data in this temp buffer to work with
Well, you do have to allocate memory somehow, either on the stack or dynamically through malloc or whatever.
As far as I can understand, you’re just trying to copy the contents of one buffer into another. It’s a simple memory copy. We could assist you better, if you gave more details. You show no code. You don’t use good terminology. We are left confused.