![]() |
![]() |
||||
![]() |
The INET unitThe INET unitThe INET unit is designed to give you access to DNS routines in the C libraries of your linux system.All the calls needed to get host entries based on IP numbers or host names are there: function GetHostEnt : PHostEnt; function GetHostByName ( Name : Pchar) : PHostEnt; function GetHostByAddr ( Addr : PHostAddr; Len : Longint; HType : Longint) : PHostEnt procedure SetHostEnt (stayopen : longint); procedure EndHostEnt; function GetNetEnt : PNetEnt; function GetNetByName ( Name : pchar) : PNetEnt; function GetNetByAddr ( Net : Longint; NetType : Longint) : PNetEnt; procedure SetNetEnt ( Stayopen : Longint); procedure EndNetEnt; function getservent : PServEnt; function getservbyname (name : pchar ; protocol : pchar) : PServEnt; function getservbyport (port : longint; protocol : pchar) : PServEnt; procedure setservent (StayOpen : longint); procedure endservent; Other than that, it implements three objects (THost, TService TNet) to do these lookups in a more pascal like manner. View the complete interface here. Provided in the archive is a makefile and two testprograms, under which a finger client. You can get the source of the unit in the packages source from the SVN repository. SVN contains a testprogram which shows what the unit can do, and how to use it.
Back to packages page.
|