#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> void _putshort(unsigned short short_integer, unsigned char *message_pointer)
The _putshort() function is used to put an unsigned short byte quantity into a byte stream.
None.
_putshort() puts a 16-bit integer into message_pointer.
DNS packets have fields that are unsigned short integers (for example, type, class, and data length). _putshort() is generally used to put these fields into a DNS packet.
Top | UNIX-Type APIs | APIs by category |