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

📄 main.cc

📁 RSA algorithm implementation is given
💻 CC
字号:
/* *   User Space DSDV Implementation * *   Binita Gupta *   University of Illinois at Urbana Champaign *    *   Email: binita@uiuc.edu *    * *   This software is Open Source under the GNU General Public License * * ******************************************* * *       General Description: *      ---------------------- *      This is the main function which creates a dsdv object and  *      calls the dsdv_daemon function. * * * *       Internal Procedures: *        * * * * 	 External Procedures: *          main() * ********************************************* * */#include "common.h"using namespace std;/*global variables */dsdv			dsdvOb;routingTable		rTableForward;routingTable		rTableBroadcast;timerQueue			timer_Q;settlingTimeTable	stlTable;u_int32_t		g_my_ip;u_int32_t		localSeqNum=0;bool			duringReboot=true;bool			is_broadcast = false;int				ksock;char*			recvBuffer;char*			sendBuffer;char			interface[20];/* TRAFFIC */u_int32_t		routing_overhead_in_bytes=0;int				traffic_sock;int				traffic_data=0;FILE			*dsdv_log_file;char			logfile_name[100];/* end of global variables */int	parse_arguments(int argc, char *argv[]);int main(int argc, char* argv[]){if(parse_arguments(argc,argv) == -1)	exit(1);recvBuffer = (char *)malloc(DSDVBUFSIZE);sendBuffer = (char *)malloc(DSDVBUFSIZE);/* call the daemon function with the interface argument */dsdvOb.dsdv_daemon(interface);}int parse_arguments(int argc, char *argv[]){	if(argc < 1)	{		cout << "Usage: dsdv -i <interface name>" << endl;		exit(1);	}	for (int i=1;i<argc;i++)	{		if(argv[i][0]=='-'){			switch(argv[i][1]){				case 'i':					strcpy(interface,argv[++i]);					break;				case 'h':					cout << "Usage: dsdv -i <interface name>" << endl;					break;			}		}	}return 0;}

⌨️ 快捷键说明

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