+static struct socket_info *swrap_get_socket_info(int si_index)
+{
+ return (struct socket_info *)(&(sockets[si_index].info));
+}
+
+static int swrap_get_refcount(struct socket_info *si)
+{
+ struct socket_info_container *sic = SOCKET_INFO_CONTAINER(si);
+ return sic->meta.refcount;
+}
+
+static void swrap_inc_refcount(struct socket_info *si)
+{
+ struct socket_info_container *sic = SOCKET_INFO_CONTAINER(si);
+
+ sic->meta.refcount += 1;
+}
+
+static void swrap_dec_refcount(struct socket_info *si)
+{
+ struct socket_info_container *sic = SOCKET_INFO_CONTAINER(si);
+
+ sic->meta.refcount -= 1;
+}
+
+static int swrap_get_next_free(struct socket_info *si)
+{
+ struct socket_info_container *sic = SOCKET_INFO_CONTAINER(si);
+
+ return sic->meta.next_free;
+}
+
+static void swrap_set_next_free(struct socket_info *si, int next_free)
+{
+ struct socket_info_container *sic = SOCKET_INFO_CONTAINER(si);
+
+ sic->meta.next_free = next_free;
+}
+