1ff559fabSmrg/*
2ff559fabSmrgCopyright 1989, 1998  The Open Group
3ff559fabSmrg
4ff559fabSmrgPermission to use, copy, modify, distribute, and sell this software and its
5ff559fabSmrgdocumentation for any purpose is hereby granted without fee, provided that
6ff559fabSmrgthe above copyright notice appear in all copies and that both that
7ff559fabSmrgcopyright notice and this permission notice appear in supporting
8ff559fabSmrgdocumentation.
9ff559fabSmrg
10ff559fabSmrgThe above copyright notice and this permission notice shall be included in
11ff559fabSmrgall copies or substantial portions of the Software.
12ff559fabSmrg
13ff559fabSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14ff559fabSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15ff559fabSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
16ff559fabSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17ff559fabSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18ff559fabSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19ff559fabSmrg
20ff559fabSmrgExcept as contained in this notice, the name of The Open Group shall not be
21ff559fabSmrgused in advertising or otherwise to promote the sale, use or other dealings
22ff559fabSmrgin this Software without prior written authorization from The Open Group.
23ff559fabSmrg * *
24ff559fabSmrg * Author:  Keith Packard, MIT X Consortium
25ff559fabSmrg */
26ff559fabSmrg
27ff559fabSmrg#ifdef WIN32
28ff559fabSmrg#define _WILLWINSOCK_
29ff559fabSmrg#endif
30ff559fabSmrg#ifdef HAVE_CONFIG_H
31ff559fabSmrg#include <config.h>
32ff559fabSmrg#endif
33ff559fabSmrg#include <X11/Xos.h>
34ff559fabSmrg#include <X11/X.h>
35ff559fabSmrg#include <X11/Xmd.h>
36ff559fabSmrg#include <X11/Xdmcp.h>
37ff559fabSmrg
38ff559fabSmrg#ifdef WIN32
39ff559fabSmrg#include <X11/Xwinsock.h>
40ff559fabSmrg#else
41ff559fabSmrg#include <sys/socket.h>
42ff559fabSmrg#endif
43ff559fabSmrg
44ff559fabSmrgint
457a3b38f7SmrgXdmcpFlush (int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen)
46ff559fabSmrg{
47ff559fabSmrg    int result;
48ff559fabSmrg    result = sendto (fd, (char *)buffer->data, buffer->pointer, 0,
49ff559fabSmrg		     (struct sockaddr *)to, tolen);
50ff559fabSmrg    if (result != buffer->pointer)
51ff559fabSmrg	return FALSE;
52ff559fabSmrg    return TRUE;
53ff559fabSmrg}
54