Take each member of the structure, use the appropriate host-to-network function, send the result over the network, use the appropriate network-to-host function at the other end.
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);
Or take each member of the structure and format according to these rules
Or sprintf() each member of the structure into a string, send the string, then sscanf() at the receiver to recover the data.