aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common/raw.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-02-28 20:34:40 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-02-28 20:34:40 +0000
commit06456076746ea64f78c59057928b2c7dfd2d734e (patch)
treedf4cd80f77d6ff8d12ecef362039cb4041880fa3 /contrib/isc-dhcp/common/raw.c
parentb02401bdd6455578fb36dc5eed002b83d88e4954 (diff)
downloadsrc-06456076746ea64f78c59057928b2c7dfd2d734e.tar.gz
src-06456076746ea64f78c59057928b2c7dfd2d734e.zip
Virgin import of ISC-DHCP v2.0b1pl17vendor/isc-dhcp/2.0b1-pl.17
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=44335 svn path=/vendor/isc-dhcp/2.0b1-pl.17/; revision=44337; tag=vendor/isc-dhcp/2.0b1-pl.17
Diffstat (limited to 'contrib/isc-dhcp/common/raw.c')
-rw-r--r--contrib/isc-dhcp/common/raw.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/isc-dhcp/common/raw.c b/contrib/isc-dhcp/common/raw.c
index 973ede13b8f9..2740c49fbe90 100644
--- a/contrib/isc-dhcp/common/raw.c
+++ b/contrib/isc-dhcp/common/raw.c
@@ -16,7 +16,7 @@
Sigh. */
/*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
#ifndef lint
static char copyright[] =
-"$Id: raw.c,v 1.11 1997/10/20 21:47:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: raw.c,v 1.11.2.2 1999/02/23 22:09:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -97,10 +97,11 @@ void if_register_send (info)
info -> wfdesc = sock;
if (!quiet_interface_discovery)
- note ("Sending on Raw/%s/%s",
+ note ("Sending on Raw/%s%s%s",
info -> name,
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
size_t send_packet (interface, packet, raw, len, from, to, hto)
@@ -115,6 +116,7 @@ size_t send_packet (interface, packet, raw, len, from, to, hto)
unsigned char buf [256];
int bufp = 0;
struct iovec iov [2];
+ int result;
/* Assemble the headers... */
assemble_udp_ip_header (interface, buf, &bufp, from.s_addr,
@@ -127,6 +129,9 @@ size_t send_packet (interface, packet, raw, len, from, to, hto)
iov [1].iov_base = (char *)raw;
iov [1].iov_len = len;
- return writev(interface -> wfdesc, iov, 2);
+ result = writev(interface -> wfdesc, iov, 2);
+ if (result < 0)
+ warn ("send_packet: %m");
+ return result;
}
#endif /* USE_SOCKET_SEND */