« Return to Thread: NetLib question

Re: NetLib question

by Julian Rohrhuber :: Rate this Message:

Reply to Author | View in Thread

ah, thanks for looking into this. I think the best solution would be
to use the POSIX way to retrieve the address. My solution was an ugly
hack.


>Hiho,
>
>while I am fixing some stuff in the Network extension of the NetLib quark...
>I came across this thing:
>
> *broadcastIP { |prefix=""|
> var  res;
> res = Pipe.findValuesForKey(prefix++"ifconfig", "broadcast");
> //res = res.add(
>Pipe.findValuesForKey(prefix++"ifconfig", "Bcast"); );
>
> if(res.size > 1) { postln("the first of those devices
>were chosen: " ++
>res) };
> ^res.first
> }
>
>(prefix is my addition)
>
>Question:
>What is the output of the ifconfig command that is parsed?
>
>On Linux it looks like:
>eth1      Link encap:Ethernet  HWaddr 00:1e:37:8a:4b:a0
>           inet addr:74.59.253.108  Bcast:255.255.255.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1
>
>Which is why I thought doing this:
>Pipe.findValuesForKey(prefix++"ifconfig", "Bcast")
>
>would work, but it seems it doesn't...
>
>sincerely,
>Marije
>_______________________________________________
>Sc-devel mailing list
>Sc-devel@...
>http://lists.create.ucsb.edu/mailman/listinfo/sc-devel


--





.
_______________________________________________
Sc-devel mailing list
Sc-devel@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel

 « Return to Thread: NetLib question

LightInTheBox - Buy quality products at wholesale price