示例#1
0
/*
 * 	A device has been "downed" remove its link status. Blow away all
 *	through routes and connections that use this device.
 */
void rose_link_device_down(struct net_device *dev)
{
    struct rose_neigh *rose_neigh;

    for (rose_neigh = rose_neigh_list; rose_neigh != NULL; rose_neigh = rose_neigh->next) {
        if (rose_neigh->dev == dev) {
            rose_del_route_by_neigh(rose_neigh);
            rose_kill_by_neigh(rose_neigh);
        }
    }
}
示例#2
0
/*
 * 	A level 2 link has timed out, therefore it appears to be a poor link,
 *	then don't use that neighbour until it is reset. Blow away all through
 *	routes and connections using this route.
 */
void rose_link_failed(ax25_cb *ax25, int reason)
{
	struct rose_neigh *rose_neigh;

	for (rose_neigh = rose_neigh_list; rose_neigh != NULL; rose_neigh = rose_neigh->next)
		if (rose_neigh->ax25 == ax25)
			break;

	if (rose_neigh == NULL) return;

	rose_neigh->ax25 = NULL;

	rose_del_route_by_neigh(rose_neigh);
	rose_kill_by_neigh(rose_neigh);
}
示例#3
0
/*
 * 	A level 2 link has timed out, therefore it appears to be a poor link,
 *	then don't use that neighbour until it is reset. Blow away all through
 *	routes and connections using this route.
 */
void rose_link_failed(ax25_cb *ax25, int reason)
{
    struct rose_neigh *rose_neigh;

    spin_lock_bh(&rose_neigh_list_lock);
    rose_neigh = rose_neigh_list;
    while (rose_neigh != NULL) {
        if (rose_neigh->ax25 == ax25)
            break;
        rose_neigh = rose_neigh->next;
    }

    if (rose_neigh != NULL) {
        rose_neigh->ax25 = NULL;

        rose_del_route_by_neigh(rose_neigh);
        rose_kill_by_neigh(rose_neigh);
    }
    spin_unlock_bh(&rose_neigh_list_lock);
}
示例#4
0
/*
 *	A Restart has occured. Delete all existing routes to this neighbour
 */
void rose_clean_neighbour(struct rose_neigh *rose_neigh)
{
	rose_del_route_by_neigh(rose_neigh);
	rose_kill_by_neigh(rose_neigh);
}