Well it already is 'bits' before you do anything.

What I think your teacher is looking for is something called serialisation. This removes all the 'struct' from the data and leaves you with pure data.

Using a char buffer is one way.

For example
char buff[ sizeof(int)*3 ];

memcpy( &buff[0], &clientpacket.header, sizeof(int) );
// etc



Ideally though, you use the htons / htonl functions.