/*
 * IS-IS Rout(e)ing protocol - isis_events.h   
 *
 * Copyright (C) 2001,2002   Sampo Saaristo
 *                           Tampere University of Technology      
 *                           Institute of Communications Engineering
 *
 * This program is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU General Public Licenseas published by the Free 
 * Software Foundation; either version 2 of the License, or (at your option) 
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
 * more details.

 * You should have received a copy of the GNU General Public License along 
 * with this program; if not, write to the Free Software Foundation, Inc., 
 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
#ifndef _ZEBRA_ISIS_EVENTS_H
#define _ZEBRA_ISIS_EVENTS_H

/*
 * Events related to area
 */
void isis_event_system_type_change (struct isis_area *area, int newtype);
void isis_event_area_addr_change (struct isis_area *area);

/*
 * Events related to circuit
 */
void isis_event_circuit_state_change (struct isis_circuit *circuit, int state);
void isis_event_circuit_type_change (struct isis_circuit *circuit, 
                                     int newtype);
/*
 * Events related to adjacencies
 */
void isis_event_adjacency_state_change(struct isis_adjacency *adj, 
                                       int newstate);

int isis_event_dis_status_change (struct thread *thread);

/*
 * Error events
 */
#define AUTH_ERROR_TYPE_LSP   3
#define AUTH_ERROR_TYPE_SNP   2
#define AUTH_ERROR_TYPE_HELLO 1
void isis_event_auth_failure (char *area_tag, char *error_string, char *sysid);

#endif /* _ZEBRA_ISIS_EVENTS_H */

