socket.h: Introduce API osmo_sockaddr_netmask_to_prefixlen()

Implementation is imported from osmo-ggsn.git
97f60e3dca581797007524e0006ca9fafad59713 in46a_netmasklen() and adapter
to work with an osmo_sockaddr.

This will be used by osmocom-bb's "modem" app.

Change-Id: I75e75e251c6776801fffdde745aebedf21c68799
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index 06db5d0..3ed9cc6 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -50,6 +50,8 @@
 int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_sockaddr *os);
 int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t src_len);
 
+int osmo_sockaddr_netmask_to_prefixlen(const struct osmo_sockaddr *addr);
+
 const char *osmo_sockaddr_to_str(const struct osmo_sockaddr *sockaddr);
 char *osmo_sockaddr_to_str_buf(char *buf, size_t buf_len,
 			       const struct osmo_sockaddr *sockaddr);