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

📄 fa_hash.h

📁 mobile ip 在linux下的一种实现
💻 H
字号:
/* $Id: fa_hash.h,v 1.3 2000/04/06 07:26:51 jm Exp $ * Foreign Agent - lower FA hash * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2000, Dynamics group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See README and COPYING for * more details. */#ifndef FA_HASH_H#define FA_HASH_H#ifdef HAVE_CONFIG_H#include <config.h>#endif#include "message.h"#include "msgparser.h"/* number of seconds after which a timed out, confirmed entry from the FA * hash table _may_ be removed; unconfirmed entries are removed after they * have timed out (i.e. this extra time is not used) */#define FA_HASH_EXPIRE_TIME (3600*12)/* dynamically generated hashtable of the next lower FAs */struct next_hop_data {	struct node node;	struct in_addr addr;	time_t expire;};/* dynamically generated hashtable of all the FAs that are below this FA */struct lower_fa_data {	struct node node;	int nai_len; /* FA NAI length (number of characters in 'nai' variable)		      */	char nai[MAX_NAI_LEN];	/* information about the last _accepted_ FA registration */	struct interface_entry *iface; /* the interface from which the					* FA reg. request was received */	struct sockaddr_in from; /* req. source address */	time_t reply_time; /* timestamp of the last acceptance reply */	time_t expire;	__u16 lifetime;	int confirmed; /* 1 = data confirmed (i.e. acceptance reply received			* from HFA or this node is the HFA and has accepted the			* request) */	/* unconfirmed information of the last FA request */	time_t req_time; /* timestamp of the request */	__u16 req_lifetime; /* requested lifetime */	struct interface_entry *req_iface; /* the incoming interface or					    * NULL = no pending request */	struct sockaddr_in req_from; /* source address */	__u8 use_nonce_down[FA_REG_NONCE_LEN]; /* the nonce value received in						* a request; to be copied to						* the next reply */	__u8 use_nonce_up[FA_REG_NONCE_LEN]; /* the nonce value received in					      * a reply; to be copied to					      * the next request */	/* the nonce value sent upwards in the request; reply must match with	 * this */	__u8 wait_nonce_rep[FA_REG_NONCE_LEN];	/* the nonce value expected to be receive in the next request;	 * next request must match with this or the request is denied and	 * the nonces are resynchronized */	__u8 wait_nonce_req[FA_REG_NONCE_LEN];};int fa_hash_init(void);void fa_hash_destroy(void);struct interface_entry* fa_hash_check(struct fa_nai_ext *nai);int fa_hash_check_next_hop(struct in_addr addr);void fa_hash_expire(void);enum { FA_REGISTER, FA_DEREGISTER };void fa_register(int dereg);int handle_fa_req(char *msg, int n, struct msg_extensions *ext,		  struct sockaddr_in *cli_addr,		  struct interface_entry *iface);int handle_fa_rep(char *msg, int n, struct msg_extensions *ext,		  struct sockaddr_in *cli_addr,		  struct interface_entry *iface);#endif

⌨️ 快捷键说明

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