net: Add helper to get sockaddr from sockaddr_storage struct

As one should not instantiate sockaddr struct (only have pointers
to it), but only use struct sockaddr_storage to store the
socket address information. In order to simplify the casting,
create net_sad() macro that casts a "struct sockaddr_storage *" to
"struct sockaddr *" which can then be used by other macros in the
networking stack.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
1 file changed