summaryrefslogtreecommitdiff
path: root/src/network/getsockopt.c
blob: 8c818863b58394ff2c41ddf22fb2c4b8a7314463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <sys/socket.h>
#include "syscall.h"
#include "socketcall.h"

int getsockopt(int fd, int level, int optname, void *optval, socklen_t *optlen)
{
	unsigned long args[] = {
		fd, level, optname,
		(unsigned long)optval,
		(unsigned long)optlen
	};
	return syscall2(__NR_socketcall, SYS_GETSOCKOPT, (long)args);
}