summaryrefslogtreecommitdiff
path: root/src/discover.c
blob: 53eef730eaba7efcb208f2309433bb4d4ddf61e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "osm/utils.h"

#include <stdio.h>
#include <dirent.h>
#include <stddef.h>
#include <errno.h>

Vector osm_discover_onboard(char *sock_dir)
{
	Vector out = vect_init(sizeof(char));

	DIR *d = opendir(sock_dir);
	if (d)
	{
		struct dirent *dir;
		while((dir = readdir(d)) != NULL)
		{
			if (dir->d_type == DT_SOCK)
			{
			}
		}
		errno = 0;
		closedir(d);
	}
	else
	{
		perror("opendir");
	}

	return out;
}