aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common/nit.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/nit.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/nit.c')
-rw-r--r--contrib/isc-dhcp/common/nit.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/contrib/isc-dhcp/common/nit.c b/contrib/isc-dhcp/common/nit.c
index 1801bb9f3579..047f2a11ae55 100644
--- a/contrib/isc-dhcp/common/nit.c
+++ b/contrib/isc-dhcp/common/nit.c
@@ -4,7 +4,7 @@
with one crucial tidbit of help from Stu Grossmen. */
/*
- * Copyright (c) 1996 The Internet Software Consortium.
+ * Copyright (c) 1996, 1998, 1999 The Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.15.2.1 1998/12/20 18:27:44 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.15.2.3 1999/02/23 22:09:54 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -155,12 +155,13 @@ void if_register_send (info)
info -> wfdesc = info -> rfdesc;
#endif
if (!quiet_interface_discovery)
- note ("Sending on NIT/%s/%s",
+ note ("Sending on NIT/%s%s%s",
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_NIT_SEND */
@@ -238,12 +239,13 @@ void if_register_receive (info)
error ("Can't set NIT filter on %s: %m", info -> name);
if (!quiet_interface_discovery)
- note ("Listening on NIT/%s/%s",
+ note ("Listening on NIT/%s%s%s",
print_hw_addr (info -> hw_address.htype,
info -> hw_address.hlen,
info -> hw_address.haddr),
+ (info -> shared_network ? "/" : ""),
(info -> shared_network ?
- info -> shared_network -> name : "unattached"));
+ info -> shared_network -> name : ""));
}
#endif /* USE_NIT_RECEIVE */
@@ -263,6 +265,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
struct strbuf ctl, data;
int hw_end;
struct sockaddr_in foo;
+ int result;
if (!strcmp (interface -> name, "fallback"))
return send_fallback (interface, packet, raw,
@@ -298,7 +301,10 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
data.buf = (char *)&buf [hw_end];
data.maxlen = data.len = bufp + len - hw_end;
- return putmsg (interface -> wfdesc, &ctl, &data, 0);
+ result = putmsg (interface -> wfdesc, &ctl, &data, 0);
+ if (result < 0)
+ warn ("send_packet: %m");
+ return result;
}
#endif /* USE_NIT_SEND */