1 //==========================================================================
5 // recvfrom() 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 recvfrom(int s, const void *buf, size_t buflen,
42 int flags, const struct sockaddr *from, socklen_t *fromlen)
44 struct sys_recvfrom_args args;
46 SYSCALLARG(args,s) = s;
47 SYSCALLARG(args,buf) = (void *)buf;
48 SYSCALLARG(args,len) = buflen;
49 SYSCALLARG(args,flags) = flags;
50 SYSCALLARG(args,from) = (struct sockaddr *)from;
51 SYSCALLARG(args,fromlenaddr) = fromlen;
52 error = sys_recvfrom(&args, &res);