📄 fnsrr.h
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2002/01/17 10:06:50 $* $Source: M:/psisrc/routing/incl/rcs/fnsrr.h $* $Revision: 1.25 $**************************************************************************** File Description: Interface between Fusion and router code (RR) ***************************************************************************/#ifndef _FNSERR_#define _FNSERR_#include "netdev.h"#include "fnsproto.h"#include "rconst.h" /* for RIP_PORT */#include "os_const.h" /* for AUTH_TYPE_NONE */#include "rrtypes.h"#include "rribd.h"#include "ipport.h"#include "rrsnadd.h"#include "iprtypes.h" /* for IPRT_LOCAL */#include "ip_types.h"#include "icirc.h"#include "riproute.h" /* All we need for RIP and forwarding database */#ifdef OSPF_PROTOCOL#include "ospf_api.h" /* All we need for OSPF */#endifextern INODE *i_node;/***********************************************FNSRR Specific macros***********************************************/#define ROUTER_RQ_MAX 16384#define ROUTER_SQ_MAX 16384/* external to fnsrr.c */extern void IrIpRtInit(void);extern void ospfTic(void);extern void RipTic(void);extern int RipEnable(void);extern int RipDisable(int bLeaveEnabled);extern int rip_do_get_admin_state( u32 *parm1 );extern void ripinit(void);extern void riprx(void *pdu,int len,int cid,rripa sipa,rrword sport);extern rcirc_pt ripCircCreate(int type,int rcid);extern rcirc_pt ripCircFromId(int cid);/* From rricirc.c */icirc_pt ipCircCreate( int type, snad_pt ladd, int maxlen, int if_id, int rcid, dword ifspeed);int ipCircSetIPA(icirc_pt c, ipna_pt ipna, void *magic);icirc_pt ipCircFromId(int id);void ipCircEvent(icirc_pt c, int event, void *param);int ipCircEnable(icirc_pt c);/*** rricirc.c ***/extern int ospfSetCircArea(void * intf,rripa areaid,int test);extern int ospfEnable(void);extern int ospfCircEnable(void *intf);extern int ospfCircDisable(void *intf);extern void ospfCircEvent(void *intf, int event, void *parm1,void *parm2);extern int ospfAddRange(rripa areaid,ipna_pt ipnap,int adv);extern rripa ospfGetRtid(void);extern int ospfAreaModify(rripa areaid, int param, void *valp);extern int ospfNodeModify(int param, void *valp);extern int _do_ospf_global_config( void *cfg );extern int _do_ospf_area_config( void *cfg );extern int _do_ospf_range_config( void *cfg );extern int _do_ospf_if_config( netdev *ndp, char *name, void *cfg );extern int _do_ospf_vlink_config( char *vname, void *cfg );extern int _do_ospf_retr_neigh_table( void *vptbl );extern int _do_ospf_retr_lsdb( void *vplsdb );extern int _do_ospf_retr_area_table( void *vptbl );extern int _do_ospf_retr_if_table( void *vptbl );extern iproute_ent_pt ipFindRoute(ipna_pt ipnap,int owner);extern void ipDelRoute(iproute_ent_pt rtp);extern iproute_ent_pt ipAddRoute(ipna_pt ipnap, rripa src, int cid ,int cost,int owner,rripa tag);extern int ipAddStaticRoute(ipna_pt ipna,rripa next,int cid,int cost);extern int ipGetRoutingTable(void *rtable);extern int ipRedistAddDel( int dest_prot, int source, int bAddDel, void *parm, int *errp);extern int ipDelStaticRoute(ipna_pt ipna);extern void ripCircEvent(int cid, int event, void *param,void *parm2);/* router_events flags */#define R_TIC (char)0x1 /* timer tic */#define R_INCOMING (char)0x2 /* Incoming packet */#define R_ROUTE (char)0x4 /* Add a local/static route *//******************************************************************************* * * We only need a router task if we are running a routing protocol and * we don't have INLINE_ROUTER defined. * */#if !defined(INLINE_ROUTER) && (defined(RIP_PROTOCOL) || defined(OSPF_PROTOCOL))#define ROUTER_TASK 1#else#define ROUTER_TASK 0#endif /************************************************************************/#ifdef __FNSRR_C__#define FNSRR_EXPORT export#define FNSRR_IMPORT import#else#define FNSRR_EXPORT import#define FNSRR_IMPORT export#endif#define ROUTER_PERIOD 1000Ltypedef struct icmp_header{ rrbyte icmp_type; rrbyte icmp_code; rrbyte icmp_csum1; rrbyte icmp_csum0; rrbyte icmp_dat[256];}ICMPPDU, *icmppdu_pt;int iptxtofns (ibd_pt bd, int len, rripa dipa, netdev * ndp, int prot_type); /* icmp.c */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -