teamd: allow to remove loop callbacks from callbacks

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: usock: leave accepted socket open for more commands

This will also provide a possibility to send events over these sockets

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteamdctl: usock: benefit from possibility of multiple sock method calls

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: usock: allow to receive large usock messages

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: usock: set nowait flag to recv

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: usock: introduce common function teamd_usock_recv_msg()

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
usock: use SOCK_SEQPACKET

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
usock: use SIOCINQ ioctl to get expected data length

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamd: usock: handle ECONNRESET gracefully

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteamdctl: usock: fix memory lead composing message using asprintf

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
libteamdctl: cli_usock: more wait select to cli_usock and use timeout

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
teamdctl: add error string printout

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
usock: refactor protocol and core around it a bit

Signed-off-by: Jiri Pirko <jiri@resnulli.us>