Solved

IP to long IP

Posted on 1997-06-22
4
228 Views
Last Modified: 2010-05-18
I would like to have the source code, in delphi, to convert an IP address to a long IP address.
0
Comment
Question by:fmichaud061597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Expert Comment

by:icampbe1
ID: 1337469
Be clear.  Do you mean IP like TCP/IP?? Or do you mean IP like Integer Pointer??   What is a long TCP/IP address anyway??  They are all four numeric groupings aren't they?  like:  012.345.678.901  

I would like to help if you would clarify a bit.

Ian C.
0
 

Author Comment

by:fmichaud061597
ID: 1337470
The long IP is used in the IRC protocole to invoke, for example, a DCC Chat connexion. The algorythm takes the normal IP like: 127.0.0.1 and converts it to something like: 456373647
0
 
LVL 3

Accepted Solution

by:
sperling earned 50 total points
ID: 1337471
Can't you just use TInAddr in Winsock.pas ?

  TInAddr = packed record
    case integer of
      0: (S_un_b: SunB);
      1: (S_un_w: SunW);
      2: (S_addr: u_long);
  end;

Set S_un_b and read S_addr.


Regards,

Erik.

0
 

Author Comment

by:fmichaud061597
ID: 1337472
I got the source code for that, so if you want it send me a message!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question