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

📄 mip6_shisad.h

📁 vxworks 6.x 的全部头文件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* mip6_shisad.h - MIP6 basic data structure header file *//* Copyright 2005 Wind River Systems, Inc. *//*	$KAME: shisad.h,v 1.3 2004/12/27 10:50:33 t-momose Exp $	*//* * Copyright (C) 2004 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *//*modification history--------------------01f,27sep05,tlu  comment out debug and numerichost variables01e,01sep05,tlu  rename mip6 file name01d,09aug05,tlu  rename mip6stat to _mip6stat01c,24jun05,tlu  move out show routines and debugging routines01b,14jun05,tlu  add _cplusplus condition01a,20feb05,tlu  1st round of porting Kame MIP6*/#ifndef _SHISAD_H_#define _SHISAD_H_#ifdef __cplusplusextern "C" {#endif/* Tong */#include <netinet6/icmp6.h>extern struct mip6_mninfo mninfo;extern int mipsock, mhsock, icmp6sock;extern struct _mip6stat mip6stat;extern struct mip6_hinfo_list hoa_head;/* protocol constants. */#define DHAAD_RETRIES		4#define MAX_BINDACK_TIMEOUT	32#define INITIAL_DHAAD_TIMEOUT	3#define INITIAL_BINDACK_TIMEOUT	1#define MAX_DHAAD_TIMEOUT	(INITIAL_DHAAD_TIMEOUT << DHAAD_RETRIES)#define INITIAL_HOTI_COTI_TIMEOUT	1#define MAX_HOTI_COTI_TIMEOUT		32/* protocol configuration variables. */extern int initial_bindack_timeout_first_reg_count;/* return routability parameters. */#define MIP6_MAX_TOKEN_LIFE	210#define MIP6_MAX_NONCE_LIFE	240#define MIP6_COOKIE_SIZE	8#define MIP6_TOKEN_SIZE		8#define MIP6_NONCE_SIZE		8       /* recommended by the spec (5.2.2) */					/* must be multiple of size of u_short */#define MIP6_NODEKEY_SIZE	20      /* This size is specified at 5.2.1 in mip6 spec */#define MIP6_NONCE_HISTORY	10#define MIP6_NONCE_REFRESH	60#define MIP6_BRR_INTERVAL	3#define MIP6_KBM_SIZE		20#define MIP6_AUTHENTICATOR_SIZE	12#define MIP6_MAX_RR_BINDING_LIFE	420#define MIP6_DEFAULT_BINDING_LIFE	10#define MIP6_HOAOPT_PADLEN 4 /* length of Padding for HoA destination option */typedef u_int8_t mip6_nonce_t[MIP6_NONCE_SIZE];typedef u_int8_t mip6_nodekey_t[MIP6_NODEKEY_SIZE];typedef u_int8_t mip6_cookie_t[MIP6_COOKIE_SIZE];typedef u_int8_t mip6_token_t[MIP6_TOKEN_SIZE];typedef u_int8_t mip6_kbm_t[MIP6_KBM_SIZE];typedef u_int8_t mip6_authenticator_t[MIP6_AUTHENTICATOR_SIZE];/* Macro for modulo 2^^16 comparison */#define MIP6_LEQ(a,b)   ((int16_t)((a)-(b)) <= 0)#define CND_PIDFILE	"/var/run/cnd.pid"#define MND_PIDFILE	"/var/run/mnd.pid"#define HAD_PIDFILE	"/var/run/had.pid"#define MND_NORO_FILE 	"/etc/ro.deny"#ifdef MIP_NEMO#define NEMO_PTFILE 	"/etc/prefix_table.conf"#endif /* MIP_NEMO */#define _PATH_SHISADCONF	"/usr/local/v6/etc/shisad.conf"/* * homeprefix_info -> homeprefix_info -> ... *      | *      +-ha_list -> ha_list -> ... */struct home_agent_list {	LIST_ENTRY(home_agent_list) hal_entry;	/* common for mobile node and home agent */        struct in6_addr hal_lladdr;  /* Link-local address of HA */        struct in6_addr hal_ip6addr; /* global IPv6 address of HA */	int             hal_flag;#define MIP6_HAL_OWN    0x01#define MIP6_HAL_STATIC 0x02	/* HA exclusive field: it is used when ha receives RA */	struct mip6_halist_ha_exclusive {		u_int16_t halist_lifetime;   /* Remaining lifetime */		u_int16_t halist_preference; /* Preference for this HA */	} hal_for_ha;#define hal_lifetime hal_for_ha.halist_lifetime#define hal_preference hal_for_ha.halist_preference        CALLOUT_HANDLE        hal_expire;   /* callout handle for expiration */};LIST_HEAD(home_agent_list_head, home_agent_list);struct mip6_hpfxl {	LIST_ENTRY(mip6_hpfxl) hpfx_entry;		/* common for mobile node and home agent */	struct in6_addr     hpfx_prefix;     /* home prefix (may                                                contail full IPv6                                                address) */	u_int8_t            hpfx_prefixlen;  /* home prefix length */	u_int8_t	    hpfx_flags;	struct home_agent_list_head hpfx_hal_head;   /* home agent list head */	/* mn exclusive field: it is used when mn receives MPA */	struct mip6_hpfx_mn_exclusive {		u_int32_t hpfxlist_vltime;		time_t    hpfxlist_vlexpire;		u_int32_t hpfxlist_pltime;		time_t    hpfxlist_plexpire;		time_t    hpfxlist_timeout;      /* expiration time */		CALLOUT_HANDLE hpfxlist_retrans; /* callout handle for                                                    retrans */	} hpfx_for_mn;#define hpfx_vltime   hpfx_for_mn.hpfxlist_vltime#define hpfx_vlexpire hpfx_for_mn.hpfxlist_vlexpire#define hpfx_pltime   hpfx_for_mn.hpfxlist_pltime#define hpfx_plexpire hpfx_for_mn.hpfxlist_plexpire#define hpfx_timeout  hpfx_for_mn.hpfxlist_timeout#define hpfx_retrans  hpfx_for_mn.hpfxlist_retrans};LIST_HEAD(mip6_hpfx_list, mip6_hpfxl);/* For Correspondent Node */struct mip6_nonces_info {	struct mip6_nonces_info *next, *prev;	u_int16_t nonce_index;	u_int8_t  nonce[MIP6_NONCE_SIZE];	u_int8_t  node_key[MIP6_NODEKEY_SIZE];	time_t	  nonce_lasttime; /*  generated time */};/* * Per Home Address  *  hoa_info: Home Address Information *    +- bul: Binding Update List * * Per Home Link  *  mip_if: Virtual IF information *    +- hpfx: Home Prefix List *        +- hal: Home Agent List * * hoa_info ---> hoa_info -> hoa_info..  *    +       *    +--bul -> bul -> bul.. *    | *    +--mpfx -> mpfx -> mpfx.. (NEMO only) * * mip_if -> mip_if -> mip_if.. *   + *   +-- hpfx -> hpfx -> hpfx.. *        +-- hal -> hal -> hal.. */LIST_HEAD(binding_update_list_head, binding_update_list);struct binding_update_list {	LIST_ENTRY(binding_update_list) bul_entry;	struct in6_addr     bul_peeraddr;   /* peer addr of this BU */	struct in6_addr     bul_coa;        /* CoA */	u_int16_t           bul_lifetime;   /* BU lifetime */	u_int16_t           bul_refresh;    /* refresh frequency */	u_int16_t           bul_seqno;      /* sequence number */	u_int16_t           bul_flags;      /* BU flags */	/* The last time when mn sent the BU */	time_t		    bul_bu_lastsent;	mip6_cookie_t       bul_home_cookie;	u_int16_t           bul_home_nonce_index;	mip6_token_t        bul_home_token;   /* home keygen token */	mip6_cookie_t       bul_careof_cookie;	u_int16_t           bul_careof_nonce_index;	mip6_token_t        bul_careof_token; /* careof keygen token */	struct mip6_hoainfo *bul_hoainfo; /* backpointer to hoa_info */	int                 bul_home_ifindex; /* ifindex of home network */	u_int8_t            bul_reg_fsm_state;/* registration state */	u_int8_t            bul_rr_fsm_state; /* rr state */	CALLOUT_HANDLE      bul_retrans;      /* callout handle for retrans */	u_int8_t            bul_retrans_time;	CALLOUT_HANDLE      bul_expire;       /* callout handle for failure */	u_int8_t            bul_state;        /* local status */

⌨️ 快捷键说明

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