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

📄 mn_agentadv.h

📁 mobile ip 在linux下的一种实现
💻 H
字号:
/* $Id: mn_agentadv.h,v 1.32 2001/09/23 16:07:14 jm Exp $ * Header files for Mobile Node agentadv module * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2001, 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 MN_AGENTADV_H#define MN_AGENTADV_H#include "agentadv.h"#include "list.h"#include "sys/time.h"#include "hashtable.h"/* keep agentadv data for x seconds after the expiration */#define ADV_EXTRA_TIME 10/* check agentadv data for expired entries every x seconds */#define ADV_CLEANUP_FREQ 10/* get_fa() return values: */#define FA_GET_NO 0#define FA_GET_CHANGED 1#define FA_GET_SAME 2#define MAX_FA_NAI_LEN (sizeof(struct fa_nai_ext) + 255)enum {	MN_ADV_TYPE_UNKNOWN = 0,	MN_ADV_TYPE_FA /* FA (and possibly unknown HA) */,	MN_ADV_TYPE_HA /* unknown HA */,	MN_ADV_TYPE_OWN_HA /* our own HA (and possibly FA) */};/* key for the agentadv_data hashtable */struct agentadv_key {	struct in_addr addr;	int ifindex;};struct agentadv_data {	struct node node; /* entry hashed into the hashtable */	struct in_addr addr; /* address of the FA sending this advertisement */	int ifindex; /* interface that received the last agentadv */	char ifname[IFNAMSIZ];	struct timeval last; /* time when this advertisement was received */	struct timeval expire; /* expiration time for this entry				* (last + radv->lifetime + 1); i.e. this				* _may_ be removed after this timestamp */	char buf[MAX_ADV_MSG]; /* the last received agent advertisement */	struct adv_extensions adv;	int adv_type; /* MN_ADV_TYPE_* */	int arpentry; /* 1 = own ARP entry used */	int in_use;   /* 1 = currently registered to this FA or trying to		       * register to this FA (i.e. do not expire the entry) */	int priority; /* This is modified by FA_GET handlers */	int priority_degraded; /* priority*(100-degrade) / 100 */	int prio_degrade_percent; /* degrade priority this much percents */	struct monitor_address *mon; /* monitor data */	int routeentry; /* 1 = own host route entry used */	unsigned long int counter; /* the number of received advs */	long last_heard_seqn; /* sequence number of last heard advertisement */	int reg_failed; /* 1 = reg. failed to this FA */	int reg_retry_time; /* number of seconds to wait until the next			     * registration request is sent */};struct interface_data;int handle_icmp(struct interface_data *iface);struct agentadv_data *get_ok_fa(void);int clean_agentadv(struct node *node, void *data);int get_fa(struct agentadv_data *adv);struct agentadv_data *adv_fetch(struct hashtable *adv_hash, 				struct in_addr *addr, int ifindex);#endif

⌨️ 快捷键说明

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