📄 fr.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: 2001/09/20 10:19:19 $* $Source: M:/psisrc/stack/incl/rcs/fr.h $* $Revision: 1.10 $*************************************************************************** File Description: FUSION kernel router structures***************************************************************************/#ifndef _FR_#define _FR_#include "config.h"#include "ccdep.h"#include "std.h"#include "socket.h"#include "q.h"#include "timer.h"#include "dsu.h"#include "netdev.h"#include "m.h"#define F_R_B42CAST 0x10 /* This net uses B42 0 braodcast addresses *//* scanning protection ('how's) */#define RS_EXCL 1 /* scan w/ exclusive (r/w) use */#define RS_SAFE 2 /* scan w/ safe (r/o) use *//* Queued packet processing structure */typedef struct qtb { /* queue type block */ q qtb_q; /* head of queued functions */ u16 qtb_ins; /* count of active parties herein */ u16 qtb_waits; /* count of sleepers */} qtb;/* dispatch message to a predefined device *//* Structure mapping link-layer packet type to/from address family */typedef struct aftmap { u32 tm_type; /* packet's type */ u16 tm_af; /* address family */ i16 tm_arp_needed; /* ARP needed for this AF on this LLAF */} aftmap;/* Structure of headers for address family (see 'ahp_tbl' in "ncaf.c") */typedef struct afh { /* NOTE: indexed by address family */ i16 ah_valid; /* good and usable one */ u16 ah_alen; /* length of these addresses */ int (*ah_init)(void); st (*ah_up)(m *); boolean (*ah_hmatch)(u32, u8 *); st (*ah_send[NLLAF])(struct m *); /* send function per LLAF */} afh;#define fbnil ((pfb_t)0)#define finil ((pfi_t)0)/* Structure of headers for link layer address families (see 'llahp_tbl' * in "ncaf.c"). */typedef struct llafh { /* NOTE: indexed by link layer address family */ u16 lah_alen; /* length of these addresses */ u16 lah_hsize; /* link layer header size */ u16 lah_maxpkt; /* maximum packet size */ u16 lah_arp_type; /* ARP type */ u32 lah_linkspeed; /* link speed */ saddr lah_broadcast; /* broadcast address for this LLAF */ aftmap * lah_map; /* map AF type to/from LLAF type */ char * lah_ppad1;} llafh;#define lah_uend lah_map/* enter ARP */#define arp_resolve(mp) ((mp)->m_flags &= ~F_M_ONCE, _arp_resolve)/* obtain and relinquish access to safe / exclusive context */#define fr_excl(f) fr_in((f),&fr_eqtb)#define fr_qexcl(f,m) fr_qin(f,m,&fr_eqtb)#define fr_qsafe(f,m) fr_qin(f,m,&fr_sqtb)#define fr_safe(f) fr_in((f),&fr_sqtb)/* count of entries in ARP cache (structure internal to "arp.c") */import u32 arp_cnt;/* time (minutes) that an ARP cache entry lives w/o refresh */import u32 arp_ttl;/* time (msec) ARP will hold messages pending resolution */import u32 arp_q_interval;/* master header for address families w/i kernel */import afh * ahp_tbl[];/* access control queue for exclusive context */import qtb fr_eqtb;/* access control queue for safe context */import qtb fr_sqtb;/* master header for link-layer address families w/i kernel */import llafh * llahp_tbl[];/* number of address families (dimensionality of 'ahp_tbl') */import u32 n_af;/* number of link-layer address families (dimensionality of 'llahp_tbl') */import u32 n_llaf;#endif /*_FR_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -