-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Cool!
But the advantages of the dhcpdiscover are two:
- - it does not ask for a dhcp lesse (it does not send the last ACK), so
there is not "footprint" for trying to discover it
- - you can ignore a dhcp server by IP, so you can run your own dhcp
server and find out if there is some other in the network
On 17/10/13 09:46, Gui Iribarren wrote:
Mando algo que me habia quedado colgado en el outbox,
una forma
simple de chequear dhcp servers con udhcpc
On 07/14/2013 03:34 PM, Gioacchino Mazzurco wrote:
On Tuesday, July 09, 2013 08:23:34 PM Pau wrote:
Could be useful for us? It can be executed to
know if there are
DHCP servers (different to you) in a network interface.
(08:20:49 PM) mrkiko: the problem is ethernet - how is it possible
to check if ethernet connectivity is actually available in an
event-based way? So, since ifup implies ifdown and then ifup, I was
thinking to try to ifup the interface and verify with ifstatus if
things gone well (08:21:26 PM) jow_laptop: you want to chack
ethernet availability without actually bring the interface up? like
a dry-run? (08:21:31 PM) jow_laptop: s/chack/check/ (08:21:52 PM)
mrkiko: yes (08:21:56 PM) mrkiko: exactly that (08:22:36 PM)
mrkiko: I might also manage to do it by hand - with the ip command
and ping... but I would not be so happy :) (08:22:38 PM)
jow_laptop: udhcpc -n -q -s /bin/true -t 1 -i eth1
/dev/null && echo "there is
dhcp" || echo "there is no dhcp"
(08:22:56 PM) mrkiko: ah (08:23:23
PM) mrkiko: yeah - you changed
my day - for the second time (08:23:32 PM) jow_laptop: the trick is
to invoke udhcpc with a dummy script (/bin/true) that does simply
nothing with the received lease (08:23:43 PM) mrkiko: I looked ad
udhcp help various times without noticing (08:25:08 PM) jow_laptop:
you might need to ifconfig eth1 up / ip link set dev eth1 up before
calling udhcpc (08:25:13 PM) jow_laptop: not sure if it does it by
itself (08:25:48 PM) mrkiko: Infact I need to do so (08:25:52 PM)
mrkiko: and I will :) (08:25:56 PM) jow_laptop: also a larger
timeout etc. (08:26:04 PM) jow_laptop: not any dhcp server might be
that fast
I didn't take a look at code but as i said
in the past the idea
seems useful ;) _______________________________________________
Dev mailing list Dev(a)lists.libre-mesh.org
https://lists.libre-mesh.org/mailman/listinfo/dev
_______________________________________________ Dev mailing list
Dev(a)lists.libre-mesh.org
https://lists.libre-mesh.org/mailman/listinfo/dev -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
iQEcBAEBAgAGBQJSYC3yAAoJEAX7rWpc+YnNO9UIALsdv7TWX3KdYqKf2QiQEbO+
HNDgBc3P9MZgTDhHUUDpe3PViXKnMISyokbHucaWgkChbbzsqiK52IeWD0ysMgai
vB5KneXTamBlGYeMDPUvIiYralsgp2mCoMKyWZk8zw+yA9JGKhuybBhr5A5vr1j/
0yRClMF2gENiUgeifCqHJFsxngm5Yng+rJJ482ZCUBKNuGvsfsaHzELLWdllyH+s
K/MCtYxRtCggc3iwO9qERJ+g69CuN7ewIpbbKBdWFB0ji5VNvhnqrlHfYQVEss0C
1zXDCYze/03HqMfzQ+yOMS8h4qUpCpQ6VsiXd/VWJFwME+lkqCUI94h2KEMsHt4=
=zXW7
-----END PGP SIGNATURE-----