diff options
author | Ted Lemon <source@isc.org> | 2000-03-06 19:39:54 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-03-06 19:39:54 +0000 |
commit | 7203e8eedf1c42849337d1bdde3fb33e4941835b (patch) | |
tree | 3066b6582794a6c89695f580e8c87ece0aa4c30b /common/upf.c | |
parent | 0d9bfbfe141a816f099fd6fd407868913410a5b9 (diff) | |
download | isc-dhcp-7203e8eedf1c42849337d1bdde3fb33e4941835b.tar.gz |
Add interface deregistration routines (Brian Murrell).
Diffstat (limited to 'common/upf.c')
-rw-r--r-- | common/upf.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/common/upf.c b/common/upf.c index 4988c81f..22fd5531 100644 --- a/common/upf.c +++ b/common/upf.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: upf.c,v 1.15 2000/01/25 01:17:01 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: upf.c,v 1.16 2000/03/06 19:39:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -132,6 +132,24 @@ void if_register_send (info) (info -> shared_network ? info -> shared_network -> name : "")); } + +void if_deregister_send (info) + struct interface_info *info; +{ +#ifndef USE_UPF_RECEIVE + close (info -> wfdesc); +#endif + info -> wfdesc = -1; + if (!quiet_interface_discovery) + log_info ("Disabling output on UPF/%s/%s%s%s", + info -> name, + print_hw_addr (info -> hw_address.hbuf [0], + info -> hw_address.hlen - 1, + &info -> hw_address.hbuf [1]), + (info -> shared_network ? "/" : ""), + (info -> shared_network ? + info -> shared_network -> name : "")); +} #endif /* USE_UPF_SEND */ #ifdef USE_UPF_RECEIVE @@ -198,6 +216,22 @@ void if_register_receive (info) (info -> shared_network ? info -> shared_network -> name : "")); } + +void if_deregister_receive (info) + struct interface_info *info; +{ + close (info -> rfdesc); + info -> rfdesc = -1; + if (!quiet_interface_discovery) + log_info ("Disabling input on UPF/%s/%s%s%s", + info -> name, + print_hw_addr (info -> hw_address.hbuf [0], + info -> hw_address.hlen - 1, + &info -> hw_address.hbuf [1]), + (info -> shared_network ? "/" : ""), + (info -> shared_network ? + info -> shared_network -> name : "")); +} #endif /* USE_UPF_RECEIVE */ #ifdef USE_UPF_SEND |