Topic Path: Symbol Reference > Structs, Records, Enums > TIpStruct Record
TIpStruct Record

Provides storage for the components of an IP address or network mask.

TIpStruct = record
  case integer of
    0: (Byte1: byte;
        Byte2: byte;
        Byte3: byte;
        Byte4: byte;);
    1: (FullAddr: Longword;);

TIpStruct is a variant record used to store IP address values. TIpStruct has the following format: 


| Byte4 | Byte3 | Byte2 | Byte1 | (Byte variant)
|           FullAddr            | (LongWord variant)


TIpStruct provides access to the value of the IP address as a sequence of Byte values using Byte1, Byte2, Byte3, and Byte4. TIpStruct also provides access to the value of the IP address as a LongWord value using FullAddr. 

TIpStruct is used by TIpProperty and the functions IP and StrToIP to store IP addresses.

// get the next IP address Inc(AIpStruct.FullAddr); AString := Format('%d.%d.%d.%d', [ AIpStruct.Byte1, AIpStruct.Byte2, AIpStruct.Byte3, AIpStruct.Byte4 ]);

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.