Solved

IP to long IP

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now