⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip_rte_support.h

📁 备
💻 H
📖 第 1 页 / 共 4 页
字号:
/* ip_rte_support.h */
/* Internal definitions file for IP routing procedures. 		*/
/* These are used only by ip_dispatch.pr.m and its associated	*/
/* child process models.										*/

/****************************************/
/* 	     Copyright (c) 1987-2002    	*/
/*		by OPNET Technologies, Inc.		*/
/*		(A Delaware Corporation)		*/
/*	7255 Woodmont Av., Suite 250  		*/
/*     Bethesda, MD 20814, U.S.A.       */
/*			All Rights Reserved.		*/
/****************************************/

#ifndef HDR_IP_RTE_SUPPORT_H
#define HDR_IP_RTE_SUPPORT_H

#include "opnet.h"
#include "ip_dgram_sup.h"
#include "ip_rte_v4.h"
#include "ip_rte_sup_v4.h"
#include "ip_addr_v4.h"
#include "oms_devices.h"
#include "oms_qm.h"
#include "oms_bgutil.h"
#include "oms_dist_support.h"
#include "ip_cmn_rte_table.h"
#include "ip_notif_log_support.h"
#include "ip_qos_notif_log_support.h"
#include "ip_frag_sup_v3.h"
#include "ip_vpn_support.h"
#include "ip_igmp_support.h"
#include "ip_acl_support.h"
#include "ip_rte_map_support.h"
#include "oms_load_balancer.h"
#include "oms_load_balancer.h"
#include "mpls_support.h"
#include "mpls_igp_interface_defs.h"
#include "ipv6_dest_cache.h"
#include "aodv.h"
#include "dymo.h"
#include "mipv6_defs.h"

#if defined (__cplusplus)
extern "C" {
#endif

/* Enumerated types describing the multicast routing	*/
/* protocol that can be specified.						*/
typedef enum IpT_Rte_Mcast_Rte_Proto_Type
	{
	IpC_Rte_Pim_Sm = 0,
	IpC_Rte_Custom_Mrp
	} IpT_Rte_Mcast_Rte_Proto_Type;

/* Enumerated type indicating the various packet formats*/
/* that can be handled at the IP module.				*/
typedef enum IpT_Packet_Format
	{
	IpC_Packet_Format_Ip_Dgram,
	IpC_Packet_Format_Lacp_Pdu,
	IpC_Packet_Format_Invalid
	} IpT_Packet_Format;

/* Action taken when adding/removing link header.	*/
typedef enum IpT_Header_Adjust_Action
	{
	IpC_Header_Remove = -1,
	IpC_Header_Add = 1
	} IpT_Header_Adjust_Action;

/* Flags indicating the nature of IP transmission	*/
/* if the packet being processed is to be sent to	*/
/* the network.										*/
#define IPC_PKT_TXTYPE_UCAST		1
#define IPC_PKT_TXTYPE_MCAST		2
#define IPC_PKT_TXTYPE_BCAST 		3

/* Default value for the time-to-live counter.		*/
/* This value is assigned when a packet is received	*/
/* which does not already have a ttl field.			*/
#define IPC_DEFAULT_TTL				32

#define	IPC_ADDR_INDEX_INVALID			-1
#define IPC_SRC_ADDR_UNDEFINED			-1
#define IPC_NEIGHBOR_NOTIFICATION		-1
#define IPC_BROADCAST_ALL_INTERFACES    -1
#define IPC_OUTSTRM_INVALID				-1
#define IPC_INTF_INDEX_INVALID			-50
#define IPC_SUBINTF_INDEX_INVALID		-50
#define IPC_INTF_TBL_INDEX_NULL0		-10
#define IPC_INTF_TBL_INDEX_LSP      	-20
#define IPC_INTF_TBL_INDEX_LDP_BIND		-30
#define IPC_INTF_TBL_INDEX_MPLS			-40
#define IPC_MCAST_MAJOR_PORT_INVALID	IPC_INTF_INDEX_INVALID

/* ManetT_Info related  */
#define	MANETC_PACKET_ARRIVAL			0
#define MANETC_DEST_ADDR				1

/* Default value of tunnel interface index			*/
/* used in the ip_arp_ind_v4 ici format.			*/
#define IPC_TUNNEL_INTF_INDEX_NOT_USED	-50

/* Value of tunnel index indicating that a matching	*/
/* tunnel interface could not be found.				*/
#define IPC_TUNNEL_INTF_INDEX_NOT_FOUND	-1

/* Size of the part of TCP/IP Header in bits that	*/
/* can be compressed by using the TCP/IP Header		*/
/* Compression approach described in RFC 1144.		*/
/* Returns 320 bits (20 bytes for TCP header + 		*/
/* 20 bytes for IP header) if IPv4 and 480 bits 	*/
/* (20 bytes for TCP header + 40 bytes for IP 		*/
/* header) if IPv6									*/ 
#define IPC_TCP_COMPRESSABLE_HEADER_SIZE(_addr_family) (_addr_family == InetC_Addr_Family_v4) ? 320 : 480

#define LTRACE_COMPRESSION_ACTIVE	(op_prg_odb_ltrace_active ("ip_compression"))

#define LTRACE_IP_ACTIVE	(op_prg_odb_ltrace_active ("ip_rte") == OPC_TRUE)

/* Special slot values */
#define CENTRAL_CPU 1
#define SLOT_TO_CENTRAL_FORWARD	-2

/* Metric used with a static route entry.	*/
#define IPC_STATIC_RTE_METRIC         		0

/* Default link rate used for interfaces with no    */
/* links connected to them.                         */
#define	IPC_UNSPECIFIED_RATE		        1.0E+15 

#if defined (__cplusplus)
} /* stop 'extern C' to avoid requiring it for these definitions */
#endif

typedef void (*IpT_Rte_Cloud_Packet_Send_Proc)(void * cloud_info_ptr, 
	Packet * pkptr, int oustrm, int speed, int interface_type,
	InetT_Address dest_addr, InetT_Address next_addr, int conn_class, int minor_port);

/* Used for problem reporting with appropriate process model name */
typedef void (*IpT_Rte_Error_Proc)(const char * msg);
typedef void (*IpT_Rte_Warning_Proc)(const char * msg);
#if defined (__cplusplus)
extern "C" {
#endif


/* Stores IP interface QoS information. */
typedef struct IpT_Rte_Iface_QoS_Data
	{
	/* Store the incoming Marking information for the interface. */
	OmsT_Qm_Marking_Information *  marking_incoming_info_ptr;	
	/* Store the outgoing Marking information for the interface. */
	OmsT_Qm_Marking_Information *  marking_outgoing_info_ptr;	
	/* Store the incoming CAR profile for the interface.	 */
	OmsT_Qm_Car_Profile *		car_incoming_profile_ptr;
	/* Stores the traffic status (token bucket size) for each	 */
	/* COS (Class of Service in each incoming CAR profile.		 */
	OmsT_Qm_Car_Information *	car_incoming_info_ptr;
	/* Store the outgoing CAR profile for the interface.	 */
	OmsT_Qm_Car_Profile *		car_outgoing_profile_ptr;
	/* Stores the traffic status (token bucket size) for each	 */
	/* COS (Class of Service) in each outgoing CAR profile.		 */
	OmsT_Qm_Car_Information *	car_outgoing_info_ptr;
	/* Store the CAR stathandles for the interface.	 */
	OmsT_Qm_Car_Stat_Info *		car_stat_info_ptr;
	} IpT_Rte_Iface_QoS_Data;

typedef struct IpT_Load_Balancer_Info
	{
	Prohandle                   prohandle;
	} IpT_Load_Balancer_Info;

typedef struct IpT_Gtp_Info
	{
	Objid						gtp_objid;
	} IpT_Gtp_Info;

typedef struct IpT_Manet_Info
	{
	Prohandle					mgr_prohandle;
	IpT_Rte_Protocol			rte_protocol;
	AodvT_Route_Table*			aodv_route_table_ptr; 
//koo
	DymoT_Route_Table*			dymo_route_table_ptr; 
//koo
	
	} IpT_Manet_Info;


typedef struct IpT_Mpls_Info
	{
	Prohandle						mgr_prohandle;
	List*							fecs_lptr;
	MplsT_Label_Space_Handle*		lib_space_table_ptr;
	Boolean							label_space_global;
	MplsT_Support_IGP_Callback_Proc	igp_callback_proc;
	List*							igp_shortcut_lsps_lptr;
	} IpT_Mpls_Info;

typedef struct IpT_Mip_Info
	{
	Prohandle		mgr_phndl;
	} IpT_Mip_Info;

/* Data stored for MIPv6 support.	*/
typedef struct IpT_Mipv6_Info
	{		
	Mipv6T_Node_Type					node_type;					/* MIPv6 node type.					*/
	InetT_Address						home_agent_addr;			/* Home Agent Addres.				*/
	Boolean								out_of_home;				/* Flag that indicates when the		*/
																	/* node is out of its home network.	*/
	Mipv6T_Bind_Cache_Hash_Table*		binding_cache_hashtbl_ptr;	/* Binding Cache Table (binary hash	*/
																	/* table).							*/
	Mipv6T_Bind_Update_List_Hash_Table*	binding_update_hashtbl_ptr;	/* Binding Update List (binary hash	*/
																 	/* table).							*/
	Prohandle							mipv6_prohandle;			/* MIPv6 manager process.			*/
	Prohandle							mipv6_mn_prohandle;			/* MIPv6 mobile node process.		*/
	InetT_Address*						care_of_addr_ptr;			/* Current CoA for the mobile node.	*/
	InetT_Address						home_addr;					/* Home Addres of the mobile node.	*/
	List*								bind_update_list_lptr;		/* List of key for the binding 		*/
																	/* update list.						*/
	List*								bind_cache_table_lptr;		/* List of keys for the binding 	*/
																	/*cache table.						*/
	
	/* MIPv6 control traffic stathandlers.	*/
	Stathandle							local_ctrl_traffic_sent_pkts_shndl;
	Stathandle							local_ctrl_traffic_sent_bits_shndl;
	Stathandle							local_ctrl_traffic_rcvd_pkts_shndl;
	Stathandle							local_ctrl_traffic_rcvd_bits_shndl;
	Stathandle							global_ctrl_traffic_sent_pkts_shndl;
	Stathandle							global_ctrl_traffic_sent_bits_shndl;
	Stathandle							global_ctrl_traffic_rcvd_pkts_shndl;
	Stathandle							global_ctrl_traffic_rcvd_bits_shndl;
	Stathandle							binding_cache_table_size_shndl;
	Stathandle							binding_update_list_size_shndl;

	/* MIPv6 tables traffic stathandlers.	*/	
	Stathandle							local_tunnel_traffic_sent_pkts_shndl;
	Stathandle							local_tunnel_traffic_sent_bits_shndl;
	Stathandle							local_tunnel_traffic_rcvd_pkts_shndl;
	Stathandle							local_tunnel_traffic_rcvd_bits_shndl;
	Stathandle							local_tunnel_traffic_delay_shndl;
	Stathandle							global_tunnel_traffic_sent_pkts_shndl;
	Stathandle							global_tunnel_traffic_sent_bits_shndl;
	Stathandle							global_tunnel_traffic_rcvd_pkts_shndl;
	Stathandle							global_tunnel_traffic_rcvd_bits_shndl;
	Stathandle							global_tunnel_traffic_delay_shndl;

	/* MIPv6 route optimization traffic stathandlers.	*/
	Stathandle							local_optimization_traffic_sent_pkts_shndl;
	Stathandle							local_optimization_traffic_sent_bits_shndl;
	Stathandle							local_optimization_traffic_rcvd_pkts_shndl;
	Stathandle							local_optimization_traffic_rcvd_bits_shndl;
	Stathandle							local_optimization_overhead_bits_shndl;
	Stathandle							local_optimization_overhead_ratio_shndl;
	Stathandle							global_optimization_traffic_sent_pkts_shndl;
	Stathandle							global_optimization_traffic_sent_bits_shndl;
	Stathandle							global_optimization_traffic_rcvd_pkts_shndl;
	Stathandle							global_optimization_traffic_rcvd_bits_shndl;
	Stathandle							global_optimization_overhead_bits_shndl;
	Stathandle							global_optimization_overhead_ratio_shndl;
	Stathandle							local_tunnel_traffic_overhead_bits_shndl;	
	Stathandle							local_tunnel_traffic_overhead_ratio_shndl;	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -