_getlong()--Get Long Byte Quantities
Syntax
#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> unsigned long _getlong(unsigned char *message_pointer)
Threadsafe: Yes
The _getlong() function is used to retrieve an unsigned long byte quantity.
Authorities and Locks
None.
Parameters
- message_pointer
- (Input) The pointer where the long integer is to be received from.
Return Value
_getlong() returns a 32-bit integer from where message_pointer is pointing.
Usage Notes
- DNS packets have fields that are unsigned long integers (for example, TTL and serial number). _getlong() picks these unsigned long integers out of a DNS packet and returns them.
Related Information
- _getshort()--Get Short Byte Quantities
- _putlong()--Put Long Byte Quantities
- _putshort()--Put Short Byte Quantities
API introduced: V3R1