The Right Answer, which will protect you from differences in endianness, integer size, and future changes of the structure across server and client versions, is to use something like Google Protobuf. This is a library which will pack your structure members into a neutral packet format which can then be parsed on the other side.
However, for someone learning about low-level UDP sockets, sending a structure like that between two identical machines is simple:
send( sock, &myanimal, sizeof( myanimal ), 0 );
and on the server:
recv( sock, &newanimal, sizeof( myanimal ), 0 );
(Use sendto and recvfrom for unconnected UDP sockets).
That will make a byte-for-byte copy which works just like memcpy() across the wire. If your hosts don't match closely, that copy might not line up with your structure. But if they do, you will access it on the server just like you did on the client.
You can use socketpair() to make both ends of a socket in your own process (much like pipe()) and test this without even constructing the UDP part. Once it works there, move on to UDP.