Example #1
0
static void
dump_all (void)
{
	GArray *links = nm_platform_link_get_all ();
	int i;

	for (i = 0; i < links->len; i++)
		dump_interface (&g_array_index (links, NMPlatformLink, i));
}
Example #2
0
static gboolean
do_link_get_all (char **argv)
{
	GArray *links;
	NMPlatformLink *device;
	int i;

	links = nm_platform_link_get_all (NM_PLATFORM_GET);
	for (i = 0; i < links->len; i++) {
		device = &g_array_index (links, NMPlatformLink, i);

		printf ("%d: %s type %d\n", device->ifindex, device->name, device->type);
	}
	g_array_unref (links);

	return TRUE;
}