Solved

IP to long IP

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

Industry Leaders: 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

Title # Comments Views Activity
Delphi...Split view - idea? 1 113
can i put an image from resource into image tag ? 6 30
Delphi android app hide keyboard 3 36
Browsing a TTreeView in Delphi 5 31
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 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