home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / LIBC / LIBC-4.6 / LIBC-4 / libc-linux / sysdeps / linux / sendto.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  523 b   |  23 lines

  1. #include <syscall.h>
  2. #include <sys/socket.h>
  3. #include <sys/socketcall.h>
  4.  
  5. static inline
  6. _syscall2(long,socketcall,int,call,unsigned long *,args);
  7.  
  8. /* send, sendto added by bir7@leland.stanford.edu */
  9.  
  10. int
  11. sendto (int sockfd, const void *buffer, int len, unsigned flags,
  12.     const struct sockaddr *to, int tolen)
  13. {
  14.   unsigned long args[6];
  15.   args[0] = sockfd;
  16.   args[1] = (unsigned long) buffer;
  17.   args[2] = len;
  18.   args[3] = flags;
  19.   args[4] = (unsigned long) to;
  20.   args[5] = tolen;
  21.   return (socketcall (SYS_SENDTO, args));
  22. }
  23.