Problems with getting inet_addr via PL/SQL

From: Sergey Polyakov <alexei_at_samara.net>
Date: 1997/12/23
Message-ID: <67oe22$o2k$1_at_infoserv.samara.net>#1/1


Hello all!
I'm newbie in this conference.
Sorry, for may be very simple question.
[Quoted] I have a problem. I need get a long int which is a representation of IP address.
Of course, it can be done via simple PL/SQL. For instance, '195.209.67.7' - is a string. We find a first part of address [Quoted] '195' - multiply it on 2^24, find second part, multiply on 2^16, third - multiply on 2^8, fourth and add all results. But this case is slow, as I think. I dont know why Oracle PL/SQL has not a [Quoted] bit operations kinda bit shift operations, it will be more faster. Or I'm not right about shift operation? In any case I didnt find them. Although, there is a dll winsok.dll (wsock32.dll) on NT. This dll has a function
unsigned long inet_addr ( const char FAR * cp); I tried to call this function via ORA_FFI package. It hanged up :( Although, I have not a experience with PL/SQL. And I have not idea how I can move it [Quoted] on server. I didnt see ORA_FFI package on server. Or, ORA_FFI should be moved to server too ?

If anyone has idea how I can solve my problem, or tell me where I can find a online documentation about it - please answer.

Thanx in advance



Sergey Polyakov (In Internet "BeerBong" usually) URL: (http://www.mustdie.ru/~beerbong) Phone/Fax: (+7 8462 439385) Received on Tue Dec 23 1997 - 00:00:00 CET

Original text of this message