Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I want to do an and operation between two ip addresses in tcl how to do that and i need the result ip address

5 views
Skip to first unread message

anil_ec1

unread,
Oct 3, 2008, 4:50:26 AM10/3/08
to
I want to do an and operation between two ip addresses in tcl how to
do that and i need the result ip address.

x is 192.179.1.112
y is 192.179.1.0
result z should contain the result ip address...

Thanks in advance!

Regards,
Anil A Kumar

Mark Janssen

unread,
Oct 3, 2008, 5:18:00 AM10/3/08
to

Check tcllibs IP package [http://tcllib.sourceforge.net/] you can then
do:

% ::ip::intToString [expr [::ip::toInteger 192.179.1.112] &
[::ip::toInteger 192.179.1.0]]
192.179.1.0

Mark

anil_ec1

unread,
Oct 3, 2008, 8:19:01 AM10/3/08
to

will it work for 8.14 tcl version?

Mark Janssen

unread,
Oct 3, 2008, 9:12:12 AM10/3/08
to

I assume yoou mean 8.4.14? tcllib's ip package should work for 8.4,
best way to know is to just download and install Tcllib and try it.

Mark

Cameron Laird

unread,
Oct 3, 2008, 11:03:12 AM10/3/08
to
In article <e77ad0e4-637f-45e9...@l64g2000hse.googlegroups.com>,
Mark Janssen <mpc.j...@gmail.com> wrote:
.
.
.

>> > Check tcllibs IP package [http://tcllib.sourceforge.net/] you can then
>> > do:
>>
>> > % ::ip::intToString [expr [::ip::toInteger 192.179.1.112] &
>> > [::ip::toInteger 192.179.1.0]]
>> > 192.179.1.0
>>
>> > Mark
>>
>> will it work for 8.14 tcl version?
>
>I assume yoou mean 8.4.14? tcllib's ip package should work for 8.4,
>best way to know is to just download and install Tcllib and try it.
>
>Mark

ip version 1.1.2 requires Tcl 8.2. Modification to make it work
with 8.0 is trivial. The same might well be true back to 7.6, or
beyond.

0 new messages