示例#1
0
void sys_cleanup(void)
{
/*
 * Take down the device
 */
    if (if_is_up) {
	if_is_up = 0;
	sifdown(0);
    }
}
示例#2
0
/*
 * sys_cleanup - restore any system state we modified before exiting:
 * mark the interface down, delete default route and/or proxy arp entry.
 * This shouldn't call die() because it's called from die().
 */
void
sys_cleanup()
{
    if (if_is_up)
        sifdown(0);
    if (ifaddrs[0])
        cifaddr(0, ifaddrs[0], ifaddrs[1]);
    if (default_route_gateway)
        cifdefaultroute(0, 0, default_route_gateway);
    if (proxy_arp_addr)
        cifproxyarp(0, proxy_arp_addr);
}