in reply to Intercepting UDP broadcasts

If you are not running this as root, try doing so. I have seen systems where the socket is created, but the data is not delivered to the app unless it is being run by (as) root. What kernel are you using? Also, are there any filters (iptables) blocking the data getting to the port?

--traveler

Replies are listed 'Best First'.
Re: Intercepting UDP broadcasts
by Abigail-II (Bishop) on Jan 30, 2004 at 18:26 UTC
    If you run the code as non-root, creating the socket fails. Non-root processes can't bind to ports less than 1024.

    Abigail

      Not to nit-pick, but non root users can bind to ports less than 1024 on Linux if they have the appropriate capability (CAP_NET_BIND_SERVICE) set. I think Solaris has a similar capability, but I don't have the docs here.

      --traveler