1118611Snjl/* 2118611Snjl * Copyright (c) 1988, 1993 3118611Snjl * The Regents of the University of California. All rights reserved. 4118611Snjl * 5118611Snjl * Redistribution and use in source and binary forms, with or without 6118611Snjl * modification, are permitted provided that the following conditions 7118611Snjl * are met: 8118611Snjl * 1. Redistributions of source code must retain the above copyright 9118611Snjl * notice, this list of conditions and the following disclaimer. 10118611Snjl * 2. Redistributions in binary form must reproduce the above copyright 11118611Snjl * notice, this list of conditions and the following disclaimer in the 12193529Sjkim * documentation and/or other materials provided with the distribution. 13118611Snjl * 4. Neither the name of the University nor the names of its contributors 14118611Snjl * may be used to endorse or promote products derived from this software 15118611Snjl * without specific prior written permission. 16118611Snjl * 17118611Snjl * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18118611Snjl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19118611Snjl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20118611Snjl * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21118611Snjl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22118611Snjl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23118611Snjl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24118611Snjl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25118611Snjl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26118611Snjl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27118611Snjl * SUCH DAMAGE. 28118611Snjl */ 29118611Snjl 30118611Snjl#if defined(LIBC_SCCS) && !defined(lint) 31118611Snjlstatic char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94"; 32118611Snjl#endif /* LIBC_SCCS and not lint */ 33118611Snjl#include <sys/cdefs.h> 34118611Snjl__FBSDID("$FreeBSD$"); 35118611Snjl 36118611Snjl#include <sys/types.h> 37118611Snjl#include <sys/socket.h> 38118611Snjl 39118611Snjl#include <stddef.h> 40118611Snjl 41118611Snjlssize_t 42118611Snjlsend(s, msg, len, flags) 43118611Snjl int s, flags; 44118611Snjl size_t len; 45118611Snjl const void *msg; 46118611Snjl{ 47118611Snjl /* 48118611Snjl * POSIX says send() shall be a cancellation point, so call the 49118611Snjl * cancellation-enabled sendto() and not _sendto(). 50118611Snjl */ 51118611Snjl return (sendto(s, msg, len, flags, NULL, 0)); 52118611Snjl} 53118611Snjl