Solved

IP to long IP

Posted on 1997-06-22
4
217 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 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