When using multiple client contextes in a single application, rops_pt_init_destroy_netlink() fails binding the second socket and on - only the first one succeeds. The failure is made obvious by this log:
W: rops_pt_init_destroy_netlink: netlink bind failed
So, let's fix this by doing what netlink(7) man page suggests:
If the application sets nl_pid before calling bind(2), then it is up to the
application to make sure that nl_pid is unique. If the application sets it
to 0, the kernel takes care of assigning it. The kernel assigns the process
ID to the first netlink socket the process opens and assigns a unique nl_pid
to every netlink socket that the process subsequently creates.
When other roles like ws reading data, they follow `rx_buffer_size`, then fallback to context's `pt_serv_buf_size`.
However, `raw-skt` don't follow `rx_buffer_size`, always use 0, then fallback to `pt_serv_buf_size`.
This PR make `raw-skt` don't read more than `rx_buffer_size` data.
Allow this kind of pattern for context creation info preparation
struct lws_context_creation_info info;
lws_context_info_defaults(&info, policy);
info.default_loglevel = LLL_USER | LLL_ERR | LLL_WARN;
lws_cmdline_option_handle_builtin(argc, argv, &info);
Calling lws_context_info_defaults() zeros down and prepares boilerplate in
the info struct, setting the default_loglevel asserts your application
default for the loglevel and then lws_cmdline_option_handle_builtin() will
set either that default loglevel, or override it from the commandline with
-d 1039 etc
Provide a way to apply exception mount urls that exist on top of a larger
mount, but provide an exception which enforces the url to not be serviced
by the mount code, but by whatever dynamic handler is in place.
Long story, there's also minimal example to take care of.
This change should take care of anything with ETHER_ADDR_LEN in
net/ethernet.h plus windows, for both the lib and example.
Somehow, a string replacement of ns by fsm had damaged
the license text and introduced garbage.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Introduce a LWS_WITH_WOL and an api to wake a mac address, optionally with
an address bind to the local interface to go out on.
Add a helper to parse ascii mac addresses well, and add tests.
Also thanks to OgreTransporter
https://github.com/warmcat/libwebsockets/issues/3016