1 //==========================================================================
5 // getsockopt() system call
7 //==========================================================================
8 //####BSDCOPYRIGHTBEGIN####
10 // -------------------------------------------
12 // Portions of this software may have been derived from OpenBSD or other sources,
13 // and are covered by the appropriate copyright disclaimers included herein.
15 // -------------------------------------------
17 //####BSDCOPYRIGHTEND####
18 //==========================================================================
19 //#####DESCRIPTIONBEGIN####
22 // Contributors: gthomas
28 //####DESCRIPTIONEND####
30 //==========================================================================
33 #include <sys/param.h>
34 #include <cyg/io/file.h>
35 #include <sys/socket.h>
36 #include <sys/socketvar.h>
38 #include <sys/syscallargs.h>
41 getsockopt(int s, int level, int name, void *val, socklen_t *avalsize)
43 struct sys_getsockopt_args args;
45 SYSCALLARG(args,s) = s;
46 SYSCALLARG(args,level) = level;
47 SYSCALLARG(args,name) = name;
48 SYSCALLARG(args,val) = val;
49 SYSCALLARG(args,avalsize) = avalsize;
50 error = sys_getsockopt(&args, &res);