/* ip3_rte.h */
/* Definitions file for IP routing procedures. */

/****************************************/
/* 	   Copyright (c) 1987-1996    		*/
/*			by MIL 3, Inc.				*/
/*		(A Delaware Corporation)		*/
/*	3400 International Drive,  N.W.		*/
/*		Washington, D.C., U.S.A.		*/
/*			All Rights Reserved.		*/
/****************************************/

/* Data structure describing an IP interface. */
typedef struct
    {
    int					addr_index;
	IpT_Address_Range *	addr_range_ptr;
    int					mtu;
    int					port_num;
	int					in_port_num;
    } IpT_Interface_Info;

/* Data structure describing types of dynamic routing available. */
typedef enum
	{
	IpC_Rte_Rip,
	IpC_Rte_Ospf,
	IpC_Rte_Static,
    IpC_Rte_PimDM  /* Modified by Xin Wang */
	} IpT_Rte_Protocol;

/* Data structures part of the dynamic routing API. */
typedef void *		IpT_Rte_Table_Handle;
typedef Compcode	(* IpT_Rte_Table_Lookup_Proc) (int, IpT_Rte_Table_Handle, IpT_Address, IpT_Address *);
typedef int			(* IpT_Rte_Table_Fast_Addr_Proc) (IpT_Rte_Table_Handle, IpT_Address);

typedef struct
	{
	IpT_Rte_Table_Handle			table_handle;	/* Pass to routing table services. */
	IpT_Rte_Table_Lookup_Proc		lookup_proc;	/* Lookup next hop given a destination. */ 
	IpT_Rte_Table_Fast_Addr_Proc	fast_addr_proc;	/* Get fast address for given net and node. */
	} IpT_Rte_Info;

typedef struct
    {
    List*	ip_iface_table_ptr;
    } IpT_Info;

#define	IPC_FAST_ADDR_INVALID	-1	/* Representation of an invalid fast address. */

/* Procedure Declarations */
IpT_Rte_Info *						ip_dyn_rte_info_create (void);


 