source: trunk/athena/lib/larv/larv_send_status.c @ 12017

Revision 12017, 1.1 KB checked in by ghudson, 26 years ago (diff)
larv_send_status needs to take an address.
Line 
1/* Copyright 1998 by the Massachusetts Institute of Technology.
2 *
3 * Permission to use, copy, modify, and distribute this
4 * software and its documentation for any purpose and without
5 * fee is hereby granted, provided that the above copyright
6 * notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting
8 * documentation, and that the name of M.I.T. not be used in
9 * advertising or publicity pertaining to distribution of the
10 * software without specific, written prior permission.
11 * M.I.T. makes no representations about the suitability of
12 * this software for any purpose.  It is provided "as is"
13 * without express or implied warranty.
14 */
15
16static const char rcsid[] = "$Id: larv_send_status.c,v 1.2 1998-09-30 17:36:09 ghudson Exp $";
17
18#include <sys/types.h>
19#include <sys/socket.h>
20#include "larvnet.h"
21#include "larv.h"
22#include "larv_private.h"
23
24int larv_send_status(int fd, struct sockaddr *addr, int size)
25{
26  char buf[LARVNET_MAX_PACKET];
27  int len;
28
29  len = larv__compose_packet(buf);
30  if (len == -1)
31    return -1;
32
33  return (sendto(fd, buf, len, 0, addr, size) == -1) ? -1 : 0;
34}
Note: See TracBrowser for help on using the repository browser.