_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

  1. 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



API introduced: V3R1
Top | UNIX-Type APIs | APIs by category