[erlang-questions] How to add a option for inet:getopts

Per Hedeland <>
Fri Jan 19 15:06:31 CET 2007

Serge Aleynikov <> wrote:
>Thanks for sharing this preliminary info.  As a caveat, it looks to me 
>that this option would require to run erl with root privileges (that 
>from the security point of view is not a good thing).  There's actually 
>a work around on Linux for this using 'cap_net_raw' capability, where 
>you can start the process as root, set the capability and switch to 
>effective user.  This would allow to retain access to a raw socket and 
>not to be root.

What Kenneth described has nothing to do with raw sockets, it's just the
option name that is "raw" - rather than encoded as an atom in Erlang and
with associated knowledge of value format etc all the way down to the
inet driver.

What you describe is interesting/useful in other contexts, but could
easily be implemented with a custom linked-in driver I believe - and
this may be more appropriate anyway, since there isn't even an emerging
standard for how to do these things as far as I know.


More information about the erlang-questions mailing list