DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 2nd October 2008
Sunnz's Avatar
Sunnz Sunnz is offline
Real Name: I don't have real time
Just a computer user...
 
Join Date: May 2008
Location: See Google Maps
Posts: 101
Thanked 1 Time in 1 Post
Default Reliable method to get an IP?

OK I have a few pppoe connections... which can be viewed on the command line by `ifconfig pppoe0` `ifconfig pppoe1` and so on...

I was wondering what's the most reliable way to get the IP address of them?

They all have different dynamic IP and changes over time... I want a way to detect the changes...

I was thinking of writing a python script that parses the output of `ifconfig pppoeX` and grab the IP address, compare to the one if had before.

The python script would need to be run as a cron job... maybe every 10 minutes, or every hour.

Are there any better way to do this? in pf rules one can do something like (pppoe) which seems to be more "event driven", when the changes occur it notifies pf somehow...

If there are more effective way that is "event driven" like so that I don't need to run a cron job, I don't mind if it had to be written in C or something... as long as it exist...

Cheers.
__________________
She sells C shells by the seashore.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amazon's second hand sales section reliable? Hashirsahebbb Off-Topic 3 28th March 2009 09:04 PM
best package management method TerryP Off-Topic 9 18th June 2008 03:57 PM


All times are GMT. The time now is 10:00 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick