📄 rrsnadd.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/10 16:23:22 $* $Source: M:/psisrc/routing/incl/rcs/rrsnadd.h $* $Revision: 1.4 $************************************************************************** File Description: subnetwork address and llc definitions *************************************************************************/#ifndef _snadd_h#define _snadd_h/* llc stuff */struct lan_addr{ byte addr[6];};#define MAX_SNPA_LEN 12typedef struct sn_addr{ byte s_type; byte s_len; union { struct lan_addr ea; byte x121[8]; byte e164[9]; byte ipa[8]; /* 2 IP addrs */ byte gen[MAX_SNPA_LEN]; }s_addr;}SNAD, *snad_pt;/* types */#define SN_UNKNOWN 0#define SN_LAN 1 /* 802 type */#define SN_PTPT 2 #define SN_X121 3#define SN_E164 4#define SN_GENERIC 5#define SN_MC 6#define SN_GREIP 7 /* GRE encap in IP */#define SN_IPTUNNEL 8 /* security encapsulation */#define SN_DLCI 9#define SN_VPI 10#define SN_NSAP 11/* secure tunnel source and destination */#define secure_src(xsnad) XIPA(&((xsnad)->s_addr.ipa[0]))#define secure_dst(xsnad) XIPA(&((xsnad)->s_addr.ipa[4]))/* generic router encapsulation header */#define IP_PROT_GRE 47#define GRE_PROT_OSI 0x00fe#define GRE_HDR_LEN 4typedef struct gre_header{ byte flver1; /* flags/version */ byte flver0; byte ptype1; /* protocol type */ byte ptype0;}GRE_HDR, *gre_hdr_pt;#define GRE_CP 0x80 /* csum present */#define GRE_RP 0x40 /* routing present */#define GRE_KP 0x20 /* key present */#define GRE_SP 0x10 /* seq # present */#define GRE_SRT 0x80 /* source routed */ /* used to locate incoming GRE circuit from source IP address. */typedef struct ipdest_search{ struct ipdest_search *ipd_fwd; /* links */ struct ipdest_search *ipd_bwd; /* links */ byte ipd_ipa[4]; /* ip source */ int ipd_cid; /* neigh circ*/}IPDSRCH, *ipdsrch_pt;typedef struct eth_llc_hdr{ byte llc_da[6]; byte llc_sa[6]; word llc_len; byte llc_dsap; byte llc_ssap; byte llc_cntl;}ETHLLC,*eth_llc_pt;typedef struct llc_hdr{ byte llc_da[6]; byte llc_sa[6]; byte llc_dsap; byte llc_ssap; byte llc_cntl;}LLC,*llc_pt;typedef struct eth_hdr{ byte eth_da[6]; byte eth_sa[6]; word eth_type;}ETH,*eth_pt;typedef struct eth_snap_hdr{ byte llc_da[6]; byte llc_sa[6]; word llc_len; byte llc_dsap; byte llc_ssap; byte llc_cntl; byte llc_snap[5];}ETHSNAP,*eth_snap_pt;typedef struct snap_hdr{ byte llc_da[6]; byte llc_sa[6]; byte llc_dsap; byte llc_ssap; byte llc_cntl; byte llc_snap[5];}SNAP,*snap_pt;/* whether or not to delete output frame after tx */#define NODELETE 0#define DELETE 1/* mac encapsulation type */#define ENCAP_DIX 0 /* type */#define ENCAP_RAW 1 /* len only */#define ENCAP_LLC 2 /* len,llc */#define ENCAP_SNAP 3 /* snap hdr */#define NUM_ENCAP 4#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -