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

📄 agent.h

📁 mobile ip 源程序 对移动ip 的人员有用~!
💻 H
字号:
/*----------------------------------------------------------------------------  Copyright (C) 1995-6, Vipul Gupta and Abhijit Dixit. Created 1995-6. All  rights reserved.  Linux-Mobile-IP            An implementation of Mobile IP for the LINUX operating system            developed at the State University of New York, Binghamton            (with partial support from the Center for Computing Technologies).            Except as noted in the accompanying documentation, this            implementation complies with revision 16 of the Internet             Engineering Task Force (IETF) Mobile-IP draft.            More information can be obtained from:                  http://anchor.cs.binghamton.edu/~mobileip/    Version:   1.00     05/23/1996   Authors:   Abhijit Dixit <abhijit@cs.binghamton.edu>              Vipul Gupta <vgupta@cs.binghamton.edu>             Benjamin Lancki <ben@anchor.cs.binghamton.edu>  Permission is hereby granted to redistribute this code and/or  modify it under the terms of the GNU Genral Public License  as published by the Free Software Foundation; either version  two or (at your option) any later version provided this ENTIRE  notice is retained in any copies or any part of this software.  A copy of the GNU General Public License can be obtained by contacting  the Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA.             -----------------------------------------------------------------------------*/       /*  agent.h - Include file containing constants and data structs                         for agent.c. */#ifndef _AGENT_H_#define _AGENT_H_#include "messages.h"#define MAXMHNUM       8   /* max number of MH supported by us as well as max			    # of visiting MH ...AD*/#define MAXTUNNELS     2   /* max # of tunnels supported in the kernel *//* IP address and port normally used for sending URhere messages */ #define ADVERTISETO   6090/* Ports for listening to WhereAmI and RegisterMe messages */#define WHEREAMIPORT  8888#define MIPREGPORT    434#define TUNNELUP     0x01#define MAXLIFETIME   300   /* five minute lease on the tunnel */#define ADVERTISEON "224.0.0.1"#define PENDING 0x01#define CONFIRMED 0x03typedef struct mhd     {	unsigned long ipaddr; /* its permanent address */	unsigned long SPIval;	char authtype[5]; /* identifies the algorithm to be used 			 * for authentcation */	char secret[64];   /* secret used for authentication */        int keylen;   /* size of secret key */	unsigned char status; /*TUNNELUP indicates we are supporting the host*/	unsigned long coaddr; /* end point of tunnel */	struct id RegistrationId; /* If incoming request does not contain				   * this value in its high 32 bits of Id,				   * then we have an id mismatch */ 	int timeleft; /* # of secs before this tunnel 			 	 * is destroyed and we stop forwarding */	unsigned char tunnelnum; /* tunnel number for this mh */     } mhdata;typedef struct vmhd      {        unsigned long ipaddr; /*IP addr of visiting mobile host			       which is also home addr in our case*/	unsigned long ha;  /* Home agent's addr */	unsigned long SPIval;		char authtype[5]; /* identifies the algorithm to be used 			 * for authentcation */	char secret[64];   /* secret used for authentication */        int keylen;   /* size of secret key */	unsigned char status; /* reg req pending or granted */	int timeleft; 	unsigned short fromport; /* port from which reg. request has				    come and reply should be sent */	struct id RegId; /* Id for the request by visiting foreign MH */	        } vmhdata;#endif /* _AGENT_H_ */

⌨️ 快捷键说明

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