Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: using jabber for RPC or inter-server-communication

by sauoq (Abbot)
on Jul 28, 2003 at 22:19 UTC ( #278643=note: print w/replies, xml ) Need Help??


in reply to using jabber for RPC or inter-server-communication

P.S.: anyone know how to check whether an on-demand pppd conection is up without bringing it up if it isn't?

ifconfig? Something like

my $ppp_up = system( "ifconfig $ppp_interface | grep UP > /dev/null" ) + == 0;
perhaps?

Edit: added redirection to /dev/null.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: using jabber for RPC or inter-server-communication
by schweini (Friar) on Jul 28, 2003 at 22:28 UTC
    thanks but no - pppd with the 'demand' option sets up a virtual interface that is 'up' so that applications don't notice that it actually isn't, and then buffers packets, connects, and spurts them out as soon as the connection REALLY is up...
    this is really weird. but then again, i think i saw an option with which you can set which packets bring up the interface, and which don't so maybe if i put ICMP in that thing, i can simply use ping....ah well. let's see.
    thnaks, again...

      thanks but no - pppd with the 'demand' option sets up a virtual interface that is 'up'

      But you can easily see that, because the configured IP adress is a private or invalid (depends on pppd and the configuration, on my gateway it'a a 192.168.) one, while it surely isn't once a connection is established. So checking the ifconfig output, conviniently done using Net::Ifconfig::Wrapper, check the ip-adress for validity/privateness and your done.

      regards,
      tomte


      Hlade's Law:

      If you have a difficult task, give it to a lazy person --
      they will find an easier way to do it.

        huh? really? i assigned private IPs to those virtual interfaces anyhow, so i wouldn't have noticed...but wouldn't assigning a private IP (with a route to it) to the virtual interface not destroy the whol reason for actually having that virtual interface?
        i mean - how would the packets that are supposed to go out on that link know how to go that link?
        thanks, though - i'll look for some documentaion for that...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://278643]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-07-05 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?