divine will use ARP requests to look for hosts that are always up in the networks that you frequently use your laptop in and then set the IP configuration including /etc/resolv.conf and write proxy settings in /etc/proxy. A perl script to edit your netscape 4 preferences is included. You can also run a custom script for each network to edit /etc/printcap or /etc/issue or whatever you feel like. The ARP method is much quicker than the "ping" method that other solutions use.
| Tags | Boot Networking |
|---|---|
| Licenses | GPL |
| Operating Systems | POSIX Linux |
| Implementation | C |
Recent releases


Release Notes: Better edit-netscape-proxy. divine will now cancel the ARP probe thread. This is mostly a cosmetic problem, but on some buggy PCMCIA drivers/cards it also fixes a race condition.


Release Notes: A switch to libnet-1.0 (won't work with prior versions), and 6 retries instead of 3.


Release Notes: A change of the source IP of the ARP probes to 0.0.0.0 (avoids network overlaps), and strenghened IP takeover detection.


Release Notes: An updated man page, and a minor kludge that avoids grabbing an already in-use IP.


Release Notes: Divine now exits with exit code 2 if it did not receive any answers.
Recent comments
17 Apr 2002 12:03
Re: divine
It looks like you need to install libpcap and libnet. The homepage describes this requirement. If you are using a RPM based distrobution, you probably need to install the -devel RPMs too.
> Although there are no directions, typing
> make just yields:
>
> # make
> gcc -D_REENTRANT -o divine divine.c
> -O2 -pipe -s -lnet -lpcap -lpthread
> divine.c:7: pcap.h: No such file or
> directory
> divine.c:11: libnet.h: No such file or
> directory
> divine.c: In function `sendarp\':
> divine.c:38: warning: assignment makes
> pointer from integer without a cast
> divine.c:40: warning: assignment makes
> pointer from integer without a cast
> divine.c:59: `ARPHRD_ETHER\'
> undeclared (first use in this
> function)
> divine.c:59: (Each undeclared
> identifier is reported only once
> divine.c:59: for each function it
> appears in.)
> divine.c:63: `ARPOP_REQUEST\'
> undeclared (first use in this
> function)
> divine.c:70: `ETH_H\' undeclared
> (first use in this function)
> divine.c:72: `ARP_H\' undeclared
> (first use in this function)
> divine.c: In function `main\':
> divine.c:229: storage size of `sin\'
> isn\'t known
> divine.c:240: `pcap_t\' undeclared
> (first use in this function)
> divine.c:240: `pd\' undeclared (first
> use in this function)
> divine.c:241: parse error before
> `*\'
> divine.c:266: `ARP_H\' undeclared
> (first use in this function)
> divine.c:266: `ETH_H\' undeclared
> (first use in this function)
> divine.c:269: `packet\' undeclared
> (first use in this function)
> divine.c:269: `pc_hdr\' undeclared
> (first use in this function)
> divine.c:274: dereferencing pointer to
> incomplete type
> divine.c:276: dereferencing pointer to
> incomplete type
> divine.c:276: `ARPOP_REPLY\'
> undeclared (first use in this
> function)
> divine.c:278: dereferencing pointer to
> incomplete type
> divine.c:279: dereferencing pointer to
> incomplete type
> make: *** [divine] Error 1
>
>
>
20 Jul 1999 11:11
divine
Although there are no directions, typing make just yields:
# make
gcc -D_REENTRANT -o divine divine.c -O2 -pipe -s -lnet -lpcap -lpthread
divine.c:7: pcap.h: No such file or directory
divine.c:11: libnet.h: No such file or directory
divine.c: In function `sendarp\':
divine.c:38: warning: assignment makes pointer from integer without a cast
divine.c:40: warning: assignment makes pointer from integer without a cast
divine.c:59: `ARPHRD_ETHER\' undeclared (first use in this function)
divine.c:59: (Each undeclared identifier is reported only once
divine.c:59: for each function it appears in.)
divine.c:63: `ARPOP_REQUEST\' undeclared (first use in this function)
divine.c:70: `ETH_H\' undeclared (first use in this function)
divine.c:72: `ARP_H\' undeclared (first use in this function)
divine.c: In function `main\':
divine.c:229: storage size of `sin\' isn\'t known
divine.c:240: `pcap_t\' undeclared (first use in this function)
divine.c:240: `pd\' undeclared (first use in this function)
divine.c:241: parse error before `*\'
divine.c:266: `ARP_H\' undeclared (first use in this function)
divine.c:266: `ETH_H\' undeclared (first use in this function)
divine.c:269: `packet\' undeclared (first use in this function)
divine.c:269: `pc_hdr\' undeclared (first use in this function)
divine.c:274: dereferencing pointer to incomplete type
divine.c:276: dereferencing pointer to incomplete type
divine.c:276: `ARPOP_REPLY\' undeclared (first use in this function)
divine.c:278: dereferencing pointer to incomplete type
divine.c:279: dereferencing pointer to incomplete type
make: *** [divine] Error 1