haiku/src/tests/kits/net/stop_stack.c
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00

30 lines
513 B
C

#include <stdio.h>
#include <unistd.h>
#include <kernel/OS.h>
#include "../driver/net_stack_driver.h"
#include "ufunc.h"
int main(int argc, char **argv)
{
int fd;
int rv;
test_banner("Stopping Server");
fd = open("/dev/" NET_STACK_DRIVER_PATH, O_RDWR);
if (fd < 0)
err(fd, "can't open the stack driver");
rv = ioctl(fd, NET_STACK_STOP, NULL, 0);
printf("ioctl to stop stack gave %d\n", rv);
rv = close(fd);
printf("close gave %d\n", rv);
printf("Operation complete.\n");
return (0);
}