关于window的虚拟网卡

虚拟网卡驱动源代码(原版): /* * snull.c -- the Simple Network Utility * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & Associates * * The source code in this file can be freely used, adapted, * and redistributed in source or binary form, so long as an * acknowledgment appears in derived source files. The citation * should list that the code comes from the book "Linux Device * Drivers" by Alessandro Rubini and Jonathan Corbet, published * by O'Reilly & Associates. No warranty is attached; * we cannot take responsibility for errors or fitness for use. * * $Id: snull.c,v 1.21 2004/11/05 02:36:03 rubini Exp $ */ #include #include #include #include #include #include /* printk() */ #include /* kmalloc() */ #include /* error codes */ #include /* size_t */ #include /* mark_bh */ #include #include /* struct device, and other headers */ #include /* eth_type_trans */ #include /* struct iphdr */ #include /* struct tcphdr */ #include #include "snull.h" #include #include MODULE_AUTHOR("Alessandro Rubini, Jonathan Corbet"); MODULE_LICENSE("Dual BSD/GPL"); /* * Transmitter lockup simulation, normally disabled. */ static int lockup = 0; module_param(lockup, int, 0); static int timeout = SNULL_TIMEOUT; module_param(timeout, int, 0); /* * Do we run in NAPI mode? */ static int use_napi = 0; module_param(use_napi, int, 0); /* * A structure representing an in-flight packet. */ struct snull_packet { struct snull_packet *next; struct net_device *dev; int datalen; u8 data[ETH_DATA_LEN]; }; int pool_size = 8; module_param(pool_size, int, 0); /* * This structure is private to each device. It is used to
虚拟以太网是指在真实的互联网中,通过软件方法在数据链路层实现一个 按以太网原理工作的虚拟网络。在虚拟网络中可以透明地运行所有应用程 序,支持各种第三层网络协议,如IP,IPv6,IPX等,可以进行普通的文件 共享以及ERP、VoIP等待应用。 特点: . 配置极其简单。 . 树形结构,可以从任一个节点接入,可谓一点接入,全网通行。 . 配合握手服务器(可由任一节点充当),可以实现两个节点间 直接点对点 通讯,无需 中转 !! . 3DES 数据加密 用途: . 创建企业虚拟网 . 创建专题虚拟网,你可以作为虚拟网的树根,然后把所有志同道合的人连接在一起, 形成一个独具特色的 “虚拟以太网社区”。 简单地说,任何人都可以用VE建立自己的虚拟Internet世界。 使用说明: 1. 双击virtualether.exe运行,程序会自动安装驱动程序va.sys,成功后会弹出设置界面。 2.设置方法。virtual ethernet的设置包括本地(local),远端(remote)和代理(proxy)。  . local设置,本端作为虚拟HUB接受连接:  . 设置本端的连接监听端口,即虚拟HUB的连接端口。  . 设置本端的连接密码,当远端连接过来时,需要进行密码验证。 . 设置点对点通讯的握手服务器域名/IP,及其端口。 . 如果本端想做握手服务器,可以设置一个本地的UDP端口。 注:只有本端想做虚拟HUB时才需要正确设置。    remote设置,本端作为虚拟网卡向虚拟HUB发起连接:  . 远端虚拟HUB的IP或域名(当然可以是动态域名)  . 远端虚拟HUB的密码,即远端在 local 设置中的密码 . 远端虚拟HUB的连接端口,即远端在 local 设置中监听端口 注:1.只有本端想与虚拟HUB连接时才需要正确设置。 2.如果想连接到自己的虚拟HUB,则选择“connect to my local virtual HUB”。 Proxy设置,如果你机器通过代理上网,如HTTP代理,Socket代理,就需要根据你的 代理情况进行设置。(这个功能可以穿透firewall,网管要小心啦) 如果你的上网方式是通过 http 代理,则可能需要把将要连接的虚拟HUM的监听端口设置成443才可以。 两个客户端之间发生通讯时,如果已经配置握手服务器,软件会自动尝试建立点对点通道
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值