Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Ip adress

 [1/13] from: ronaldoff:free at: 8-Jan-2003 11:50


Hello rebolers, First of all, Happy New Year to you with a lot of Rebol Scripts ;-) I'd like to get my dialup IP adress with Rebol to include this feature into a small application. How could I do it, if only possible ? Thanks in advance. -- Best regards, ronaldoff mailto:[ronaldoff--free--fr]

 [2/13] from: rebolek:seznam:cz at: 8-Jan-2003 15:01


hi, I use this aproach:
>> read dns://
== "<computer-name>"
>> read dns://<computer-name>
== 312.540.259.801 maybe it's somewhere in system/something but dunno where bye, bolek.

 [3/13] from: bry:itnisk at: 8-Jan-2003 15:28


Additional question to this, how would one get ones domain name?

 [4/13] from: mat:plothatching at: 8-Jan-2003 14:15


Hi Boleslav,
>>> read dns://
Boleslav> == "<computer-name>"
>>> read dns://<computer-name>
Boleslav> == 312.540.259.801 Boleslav> maybe it's somewhere in system/something but dunno where system/network/host-address I think you get a block of addresses so you get addresses for all your interfaces. Not easy to tell which is a dial-up real one in some instances, I expect. Regards, Mat.

 [5/13] from: ronaldoff:free at: 8-Jan-2003 16:15


Hello bryan, Wednesday, January 08, 2003, 3:28:34 PM, you wrote: b> Additional question to this, how would one get ones domain name? b> -----Original Message----- b> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]] On Behalf b> Of Boleslav Brezovsky b> Sent: Wednesday, January 08, 2003 3:02 PM b> To: [rebol-list--rebol--com] b> Subject: [REBOL] Re: Ip adress b> hi, b> I use this aproach:
>>> read dns://
b> == "<computer-name>"
>>> read dns://<computer-name>
b> == 312.540.259.801 b> maybe it's somewhere in system/something but dunno where b> bye, bolek. b> -----Original Message----- b> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]] On Behalf b> Of ronaldoff b> Sent: Wednesday, January 08, 2003 11:50 AM b> To: [rebol-list--rebol--com] b> Subject: [REBOL] Ip adress b> Hello rebolers, b> First of all, Happy New Year to you with a lot of Rebol Scripts ;-) b> I'd like to get my dialup IP adress with Rebol to include this feature b> into a small application. b> How could I do it, if only possible ? b> Thanks in advance. I'm testing some dns protocol as I learned from from this thread. Thanks to all of you guys. Boleslav's tip gives me my "home" Ip adress (NDIS5) and Computer Name, not my PPP not my adapter Ip. But, for the domain, I've tried this : read dns://212.27.32.5 == "dial-ns1-1.free.fr" where 212.27.32.5 is my dialup primary DNS Is that what you're looking for ? I'll try to search tips on dns protocol... -- Best regards, ronaldoff mailto:[ronaldoff--free--fr]

 [6/13] from: mat:plothatching at: 8-Jan-2003 15:15


Hi bryan, bryan> Additional question to this, how would one get ones domain name? Well, you could always do this; domain: read dns://system/network/host-address Of course, that would only work if the machine only had one ip and that one was a real one. Realistically you'd have to check through the list of ips, find one that looks like a real one and do it. Or prompt the user as to which is the real one. Even then, their ip may not resolve to a real domain anyway. Regards, Mat.

 [7/13] from: amicom:sonic at: 8-Jan-2003 7:43


By the time this email makes it to the list, someone else probably has already answered, but just in case... system/network/host system/network/host-address Bohdan "Bo" Lechnowsky Lechnowsky Technical Consulting At 03:28 PM 1/8/03 +0100, you wrote:

 [8/13] from: chalz:earthlink at: 8-Jan-2003 12:45


> bryan> Additional question to this, how would one get ones domain name? > > Well, you could always do this; > > domain: read dns://system/network/host-address
Problem with that, Mat. As I *just* discovered before I read your email :) It takes that like a normal path; like if I tried to read ftp://system/network/host-address .. won't work ;) You need read join dns:// system/network/host-address That is, if it's just one value. It was mentioned that you might get a block, in which case that won't work. But I only received 1 value. To make things nice and complicated, though: read join dns:// read join dns:// system/network/host =="something.blah.isp.com" ;) --Charles

 [9/13] from: vdemongodin::free::fr at: 8-Jan-2003 19:39


Hello, If you have a local network you can do this: adresses: get-modes tcp:// 'interfaces foreach interface adresses [ if (interface/addr <> 127.0.0.1) and (interface/addr <> 172.16.10.1) [ ISP-IP: interface/addr ] ] Where 172.16.10.1 is the local network card ip address. Vincent.

 [10/13] from: bry:itnisk at: 9-Jan-2003 10:00


All the methods discussed so for about IP address return my local machine's IP address, which I'm not particularly interested in, what I'm thinking about is to find what domain(s) my local machine is in, and then read the IP address of the domain server. I know how to do this in Wscript, and I could always communicate between Wscript and Rebol cause I have View/Pro so it's no hassle, I was just wondering if anyone knew if that was possible? I'm thinking it probably isn't because of the need to keep Rebol cross-platform.

 [11/13] from: g:santilli:tiscalinet:it at: 9-Jan-2003 11:34


Hi bryan, On Thursday, January 9, 2003, 10:00:48 AM, you wrote: b> All the methods discussed so for about IP address return my local b> machine's IP address, which I'm not particularly interested in, what I'm b> thinking about is to find what domain(s) my local machine is in, and port: open tcp://www.rebol.com:80 local-ip: port/local-ip close port If you have multiple network interfaces, this gives you the address of the interface your OS is using to route packets to www.rebol.com. Of course, you could use any other "external" address. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [12/13] from: bry:itnisk at: 9-Jan-2003 13:01


>port: open tcp://www.rebol.com:80 >local-ip: port/local-ip >close port
Thanks!

 [13/13] from: ronaldoff:free at: 9-Jan-2003 13:01


Hello vincent, Super !!! Exactly what I was looking for ! Thanks very much. The script I'm writing will give thru mail the ISP-IP adress of somebody asking my help by remote control of his(her) computer whith VNC like software (dialup internet access). Wednesday, January 08, 2003, 7:39:58 PM, you wrote: vd> Hello, vd> If you have a local network you can do this: vd> adresses: get-modes tcp:// 'interfaces vd> foreach interface adresses [ vd> if (interface/addr <> 127.0.0.1) and (interface/addr <> 172.16.10.1) vd> [ vd> ISP-IP: interface/addr vd> ] vd> ] vd> Where 172.16.10.1 is the local network card ip address. vd> Vincent. -- Best regards, ronaldoff mailto:[ronaldoff--free--fr]