1#include <stdio.h>
2#include <unistd.h>
3#include <kernel/OS.h>
4
5#include "../driver/net_stack_driver.h"
6#include "ufunc.h"
7
8int main(int argc, char **argv)
9{
10	int fd;
11	int rv;
12
13	test_banner("Stopping Server");
14
15	fd = open("/dev/" NET_STACK_DRIVER_PATH, O_RDWR);
16	if (fd < 0)
17		err(fd, "can't open the stack driver");
18
19	rv = ioctl(fd, NET_STACK_STOP, NULL, 0);
20	printf("ioctl to stop stack gave %d\n", rv);
21
22	rv = close(fd);
23	printf("close gave %d\n", rv);
24
25	printf("Operation complete.\n");
26
27	return (0);
28}
29
30