fd = g_socket_get_fd (src->socket);
if (getsockopt (fd, IPPROTO_TCP, TCP_INFO, &info, &info_len) == 0) {
+ /* this is system-specific */
+#ifdef HAVE_BSD_TCP_INFO
+ gst_structure_set (s,
+ "reordering", G_TYPE_UINT, info.__tcpi_reordering,
+ "unacked", G_TYPE_UINT, info.__tcpi_unacked,
+ "sacked", G_TYPE_UINT, info.__tcpi_sacked,
+ "lost", G_TYPE_UINT, info.__tcpi_lost,
+ "retrans", G_TYPE_UINT, info.__tcpi_retrans,
+ "fackets", G_TYPE_UINT, info.__tcpi_fackets, NULL);
+#elif defined(HAVE_LINUX_TCP_INFO)
gst_structure_set (s,
"reordering", G_TYPE_UINT, info.tcpi_reordering,
"unacked", G_TYPE_UINT, info.tcpi_unacked,
"lost", G_TYPE_UINT, info.tcpi_lost,
"retrans", G_TYPE_UINT, info.tcpi_retrans,
"fackets", G_TYPE_UINT, info.tcpi_fackets, NULL);
+#endif
}
}
#endif
endif
endif
+if cc.has_member('struct tcp_info', '__tcpi_reordering', prefix: '#include <netinet/tcp.h>')
+ core_conf.set('HAVE_BSD_TCP_INFO', true)
+endif
+
+if cc.has_member('struct tcp_info', 'tcpi_reordering', prefix: '#include <netinet/tcp.h>')
+ core_conf.set('HAVE_LINUX_TCP_INFO', true)
+endif
+
gir = find_program('g-ir-scanner', required : get_option('introspection'))
gnome = import('gnome')
build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())