CN100423503C - Communication adapter switching method and device - Google Patents
Communication adapter switching method and device Download PDFInfo
- Publication number
- CN100423503C CN100423503C CNB2005101028876A CN200510102887A CN100423503C CN 100423503 C CN100423503 C CN 100423503C CN B2005101028876 A CNB2005101028876 A CN B2005101028876A CN 200510102887 A CN200510102887 A CN 200510102887A CN 100423503 C CN100423503 C CN 100423503C
- Authority
- CN
- China
- Prior art keywords
- adapter
- communication
- wired lan
- wired
- adapters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/142—Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/16—Performing reselection for specific purposes
- H04W36/18—Performing reselection for specific purposes for allowing seamless reselection, e.g. soft reselection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
提供一种在具有多个通信适配器的系统中的通信适配器切换方法,该方法包括:将多个通信适配器的地址设置为与该多个通信适配器的第一个的地址相同;将除了第一通信适配器之外的所有通信适配器的包过滤模式设置为在其中所有包被接受的模式;和在通信期间当一个通信适配器被断开时,从多个通信适配器中的该通信适配器切换到另一个。因此,由于TCP/IP会话以相同的IP地址被保持,所以从有线LAN到无线LAN的无缝切换是可行的。
Provided is a communication adapter switching method in a system having a plurality of communication adapters, the method comprising: setting the address of the plurality of communication adapters to be the same as the address of the first one of the plurality of communication adapters; The packet filtering modes of all communication adapters other than the adapter are set to a mode in which all packets are accepted; and when one communication adapter is disconnected during communication, switching from the communication adapter to another of the plurality of communication adapters. Therefore, since the TCP/IP session is maintained at the same IP address, seamless switching from wired LAN to wireless LAN is possible.
Description
本申请要求在韩国知识产权局于2004年9月14日提交的第10-2004-0073299号以及于2004年12月7日提交的第10-2004-0102304号韩国专利申请的利益,这些申请完整公开于此以资参考。This application claims the benefit of Korean Patent Application No. 10-2004-0073299 filed on September 14, 2004 and Korean Patent Application No. 10-2004-0102304 filed on December 7, 2004 at the Korean Intellectual Property Office, which are in full Published here for reference.
技术领域 technical field
本发明涉及网络领域,更具体地说,涉及一种通信适配器切换方法和设备。The present invention relates to the network field, and more specifically, relates to a communication adapter switching method and equipment.
背景技术 Background technique
在Windows OS中,可安装多个用于通信的物理适配器。通过将互联网协议(IP)地址分配给每个物理适配器,通信可被执行。通过使用由网络层IP地址和传输层端口地址组成的对(pair)来设置会话,可尝试与另一方通信。如果对中的一个被改变,则会话被立即断开。In Windows OS, multiple physical adapters can be installed for communication. Communication can be performed by assigning an Internet Protocol (IP) address to each physical adapter. Communication with another party may be attempted by setting up a session using a pair consisting of a network layer IP address and a transport layer port address. If one of the pairs is changed, the session is disconnected immediately.
如果存在相同种类的两个物理适配器(例如,802.3),则不同的IP地址被分配给每个物理适配器。当通信应用连接通信会话时,基于最佳路由路径选择一个IP地址,并且经由该IP地址被分配给其的物理适配器执行与另一方的通信。例如,即使存在诸如802.3和802.11的其它的方案的物理适配器,通信仍以如上所述的相同方式执行。If there are two physical adapters of the same kind (eg, 802.3), a different IP address is assigned to each physical adapter. When a communication application connects a communication session, one IP address is selected based on an optimal routing path, and communication with another party is performed via a physical adapter to which the IP address is allocated. For example, even if there are physical adapters of other schemes such as 802.3 and 802.11, communication is performed in the same manner as described above.
如果当在安装了Windows OS并具有不同种类的物理适配器的个人计算机(PC)中同时激活有线局域网(LAN)和无线LAN时用户执行通信,并且如果这些物理适配器中的两个被连接到相同的域,则通常将使用通信速度更快的有线LAN来执行通信。即,在这种情况中使用的IP地址将是被分配给有线LAN的IP地址。这里,如果有线LAN被断开,则由于分配的IP地址不能再使用,所以Windows OS自动断开使用传输控制协议/用户数据报协议(TCP/UDP)通信的应用的会话。If the user performs communication while a wired local area network (LAN) and a wireless LAN are simultaneously activated in a personal computer (PC) on which the Windows OS is installed and has different kinds of physical adapters, and if two of these physical adapters are connected to the same domain, communication will generally be performed using a wired LAN with faster communication speeds. That is, the IP address used in this case will be the IP address assigned to the wired LAN. Here, if the wired LAN is disconnected, the Windows OS automatically disconnects the session of the application communicating using the Transmission Control Protocol/User Datagram Protocol (TCP/UDP) since the assigned IP address can no longer be used.
图1显示由微软公司提供的用于提供WindoWs OS的组网功能的核心级库。这些库被称为网络驱动程序接口规范(NDIS)驱动程序。实际物理适配器当其被连接到互连外围设备(PCI)接口时需要驱动程序,该驱动程序是由开发者提供的迷你端口驱动程序以便适合NDIS迷你端口规范。因此,实际物理适配器被激活以从另一方(LAN)接收包并将这些包发送到上层,并且从上层接收包并将这些包发送到LAN。Figure 1 shows the core-level library provided by Microsoft for providing the networking function of Windows OS. These libraries are known as Network Driver Interface Specification (NDIS) drivers. The actual physical adapter needs a driver when it is connected to a Peripheral Interconnect (PCI) interface, which is a miniport driver provided by the developer to conform to the NDIS miniport specification. Therefore, the actual physical adapter is activated to receive packets from the other side (LAN) and send them to the upper layer, and to receive packets from the upper layer and send these packets to the LAN.
普及的TCP/IP和NETBIOS实际上被称为协议驱动程序,并且在上层而不是在NDIS层运行。通常,核心级由协议驱动程序处理,并且应用属于用户级。The ubiquitous TCP/IP and NETBIOS are actually called protocol drivers and run at the upper layer rather than at the NDIS layer. Typically, the kernel level is handled by protocol drivers, and applications are user level.
参照图1,网络驱动程序系统包括WIN32包驱动程序110、上级(LAN)协议驱动程序120、NDIS 130、中间驱动程序140、迷你端口驱动程序150和160、网络接口卡(NIC)170和180。Referring to Fig. 1, the network driver system includes WIN32 package driver 110, upper level (LAN)
装置驱动程序将操作系统(OS)连接到输入/输出装置,分析从OS接收的一般请求,并将这些请求转换为特定外围控制器能够理解的命令。The device driver connects an operating system (OS) to an input/output device, analyzes general requests received from the OS, and converts the requests into commands that a specific peripheral controller can understand.
NIC 170和180是物理装置,其作为在网络中发送和接收数据帧的网关来运行。NICs 170 and 180 are physical devices that operate as gateways for sending and receiving data frames in the network.
NDIS 130提供用于在至少一个NIC驱动程序和包括OS的上层中的至少一个协议驱动程序之间进行通信的接口。即,NDIS 130提供由上级(TCP/IP)驱动程序和NIC驱动程序使用的功能库(称为封装器)。对于各种外部功能,NIC驱动程序依赖于NDIS 130,这些外部功能包括:与协议驱动程序通信、注册和截取NIC硬件中断、和与在下级的NIC 170和180通信。The NDIS 130 provides an interface for communication between at least one NIC driver and at least one protocol driver in upper layers including the OS. That is, the NDIS 130 provides a library of functions (called wrappers) used by upper-level (TCP/IP) drivers and NIC drivers. The NIC driver relies on NDIS 130 for various external functions, including: communicating with protocol drivers, registering and intercepting NIC hardware interrupts, and communicating with
NDIS驱动程序包括NIC驱动程序、中间驱动程序140、和上级协议驱动程序120。The NDIS driver includes a NIC driver, an
NIC驱动程序管理NIC。NIC驱动程序直接被连接到在下级的硬件(NIC)并提供与上面的上级驱动程序的接口。The NIC driver manages the NIC. The NIC driver is directly connected to the hardware (NIC) at the lower level and provides an interface with the upper level driver.
迷你端口驱动程序150和160,即,一种NIC驱动程序,向NIC 170和180发送数据并从NIC 170和180接收数据,并且执行管理NIC 170和180所需要的面向硬件的操作。迷你端口驱动程序150和160不能直接调用OS。取而代之,迷你端口驱动程序150和160可调用由NDIS 130导出的功能。此外,迷你端口驱动程序150和160被连接到上级驱动程序,诸如中间驱动程序140和传输协议驱动程序。The miniport drivers 150 and 160 , that is, a kind of NIC driver, send data to and receive data from the
中间驱动程序140存在于现存的协议驱动程序和迷你端口驱动程序150和160之间。中间驱动程序140对于上级传输驱动程序而言好像迷你端口驱动程序,对于迷你端口驱动程序150和160而言好像协议驱动程序。中间驱动程序140主要用于在现存的协议驱动程序和管理不被现存的协议驱动程序所识别的新介质类型的迷你端口之间执行介质转换。An
由于中间驱动程序140在驱动程序中具有中间位置,所以它与在下级的迷你端口驱动程序150和160通信,以及与上级协议驱动程序120通信。中间驱动程序140将协议进入点提供给下级以及将迷你端口进入点提供给上级。中间驱动程序140用于为NDIS 130传送用于上级协议驱动程序120的请求。中间驱动程序140对于上级协议驱动程序120而言好像迷你端口驱动程序。Since the
为了向用户提供服务,上级协议驱动程序120提供传输驱动程序接口(TDI)或面向应用的接口。上级协议驱动程序120通过打包数据、将包分配给下级驱动程序、和调用NDIS 130来将包发送到下级驱动程序。此外,上级协议驱动程序120提供与下级的协议接口以从下级驱动程序接收包。传输协议驱动程序将接收的数据发送到适当的客户端应用。In order to provide services to users, the upper-
如图2所示,在当前的Windows OS中,如果异类或同类的物理适配器之间的一条通信线路被断开,则其关联的会话被自动断开。在TCP的情况下,介质的信息被存储在TCP控制块(TCB)中,如果接口断开的信息被输入,则由于分配给该接口的IP地址不能再使用,所以TCP自动断开其关联的会话。在Windows OS中,即使TCP未断开该会话,相同的IP地址也不能被同时分配给另一接口。如果尝试将相同的IP地址分配给另一接口,那么由于TCP/IP协议驱动程序自身被拒绝(turn down)/找到(turn up),所以所有其它现存的会话被断开。As shown in Figure 2, in the current Windows OS, if a communication line between heterogeneous or homogeneous physical adapters is disconnected, its associated sessions are automatically disconnected. In the case of TCP, the information of the medium is stored in the TCP Control Block (TCB), and if the information of interface disconnection is entered, since the IP address assigned to the interface can no longer be used, TCP automatically disconnects its associated session. In Windows OS, even if TCP does not disconnect the session, the same IP address cannot be assigned to another interface at the same time. If an attempt is made to assign the same IP address to another interface, all other existing sessions are disconnected due to the TCP/IP protocol driver itself being rejected (turn down)/found (turn up).
由于这些问题,为了假装当从实际的协议驱动程序的角度看来时仅有一个接口存在,Windows OS使用可以产生虚拟适配器的桥功能。桥将相同的IP地址提供给几个接口。然而,执行换手(handoff)花费大约30秒。即,即使使用桥,但如果一个物理适配器的通信被断开,则断开信号被自动输入到由桥产生的虚拟适配器,并且TCP/IP协议驱动程序的所有会话被自动断开。此外,在桥方案中,从一个介质切换到另一个花费太多时间。试验结果显示从一个介质切换到另一个花费30秒或更多,该时间对应于TCP超时时间(timeouttime)。因此,即使断开的信息被阻塞,会话由于TCP超时仍被断开。Because of these problems, in order to pretend that only one interface exists when viewed from the actual protocol driver's point of view, Windows OS uses a bridge function that can create a virtual adapter. A bridge provides the same IP address to several interfaces. However, it takes about 30 seconds to perform a handoff. That is, even if a bridge is used, if communication of one physical adapter is disconnected, a disconnection signal is automatically input to a virtual adapter generated by the bridge, and all sessions of the TCP/IP protocol driver are automatically disconnected. Also, switching from one medium to another takes too much time in a bridge scenario. Experimental results show that switching from one medium to another takes 30 seconds or more, which corresponds to the TCP timeout time. Therefore, even though disconnected messages are blocked, the session is still disconnected due to TCP timeout.
发明内容 Contents of the invention
本发明另外的方面和/或优点将会在下面的描述中被部分地阐明,并且部分地通过描述而清楚,或者通过实施本发明可被了解。Additional aspects and/or advantages of the invention will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the invention.
本发明提供一种通信适配器切换方法和设备,用于当在异类通信适配器之间切换时保持上层中的应用的通信会话并且提供无缝通信。The present invention provides a communication adapter switching method and apparatus for maintaining a communication session of an application in an upper layer and providing seamless communication when switching between heterogeneous communication adapters.
根据本发明的一方面,提供一种在具有多个通信适配器的系统中的通信适配器切换方法,该方法包括:将多个通信适配器的地址设置为与该多个通信适配器的第一个的相同的地址;将除了第一通信适配器之外的通信适配器的包过滤模式设置为在其中所有包被接受的模式;和在通信期间当一个通信适配器被断开时,从多个通信适配器中的该通信适配器切换到另一个。According to an aspect of the present invention, there is provided a communication adapter switching method in a system having a plurality of communication adapters, the method comprising: setting the address of the plurality of communication adapters to be the same as that of the first of the plurality of communication adapters address of the communication adapter; the packet filtering mode of the communication adapters other than the first communication adapter is set to a mode in which all packets are accepted; and when a communication adapter is disconnected during communication, from the plurality of communication adapters Communication adapter switched to another.
根据本发明的另一方面,提供一种在具有多个通信适配器的系统中的通信适配器切换方法,该方法包括:设置有线LAN通信适配器的介质访问控制(MAC)地址与无线LAN通信适配器的MAC地址相同,并且将有线LAN通信适配器的包过滤模式设置为在其中所有包被接受的不加区分模式;和在使用所述有线LAN通信适配器进行通信期间当所述有线LAN被断开时,使用无线LAN信息从所述有线LAN通信适配器切换到所述无线LAN通信适配器。According to another aspect of the present invention, there is provided a communication adapter switching method in a system having a plurality of communication adapters, the method comprising: setting a Media Access Control (MAC) address of a wired LAN communication adapter and a MAC address of a wireless LAN communication adapter The addresses are the same, and the packet filtering mode of the wired LAN communication adapter is set to an indiscriminate mode in which all packets are accepted; and when the wired LAN is disconnected during communication using the wired LAN communication adapter, using Wireless LAN information is switched from the wired LAN communication adapter to the wireless LAN communication adapter.
所述通信适配器切换方法还可包括:在使用无线LAN通信适配器进行通信期间当通知或指示有线LAN被连接的事件产生时,使用有线LAN信息从所述无线LAN通信适配器切换到所述有线LAN通信适配器。The communication adapter switching method may further include switching from the wireless LAN communication adapter to the wired LAN communication using wired LAN information when an event notifying or indicating that a wired LAN is connected occurs during communication using the wireless LAN communication adapter. adapter.
所述通信适配器切换方法还可包括:将无线LAN通信适配器的包过滤模式设置为直接、多点传送、或广播模式。The communication adapter switching method may further include: setting the packet filtering mode of the wireless LAN communication adapter to direct, multicast, or broadcast mode.
所述通信适配器切换方法还可包括:如果有线LAN通信适配器被断开,则将无线LAN信息映射到虚拟适配器。The communication adapter switching method may further include mapping wireless LAN information to a virtual adapter if the wired LAN communication adapter is disconnected.
根据本发明的另一方面,提供一种在具有多个通信适配器的系统中的通信适配器切换设备,该设备包括:虚拟适配器,其将多个通信适配器的地址设置为与该多个通信适配器的第一个的相同的地址,并且将除了第一通信适配器之外的通信适配器的包过滤模式设置为在其中所有包被接受的模式;和虚拟协议驱动程序,其在通信期间当一个通信适配器被断开时,从多个通信适配器中的该适配器切换到另一个。According to another aspect of the present invention, there is provided a communication adapter switching device in a system having a plurality of communication adapters, the device comprising: a virtual adapter, which sets the addresses of the plurality of communication adapters to those of the plurality of communication adapters the same address of the first one, and set the packet filtering mode of the communication adapters other than the first communication adapter to a mode in which all packets are accepted; and a virtual protocol driver which, during communication, when a communication adapter is On disconnect, switch from one of the multiple communications adapters to another.
根据本发明的另一方面,提供一种在具有多个通信适配器的系统中的通信适配器切换设备,该设备包括:虚拟适配器,其设置有线LAN通信适配器的MAC地址与无线LAN通信适配器的MAC地址相同,并且将有线LAN通信适配器的包过滤模式设置为在其中所有包被接受的不加区分模式;和虚拟协议驱动程序,其在使用所述有线LAN通信适配器进行通信期间当所述有线LAN被断开时,使用无线LAN信息从所述有线LAN通信适配器切换到所述无线LAN通信适配器。According to another aspect of the present invention, there is provided a communication adapter switching device in a system having a plurality of communication adapters, the device comprising: a virtual adapter that sets a MAC address of a wired LAN communication adapter and a MAC address of a wireless LAN communication adapter the same, and the packet filtering mode of the wired LAN communication adapter is set to an indiscriminate mode in which all packets are accepted; and a virtual protocol driver which, during communication using the wired LAN communication adapter, when the wired LAN is When disconnected, switching from the wired LAN communication adapter to the wireless LAN communication adapter is performed using wireless LAN information.
所述虚拟协议驱动程序可包括:链路状态检测器,用于每当连接或断开事件产生时提供连接或断开状态。The virtual protocol driver may include: a link status detector for providing a connection or disconnection status whenever a connection or disconnection event occurs.
所述虚拟协议驱动程序还可包括:最佳适配器选择器,其基于由链路状态检测器提供的信息确定用于通信的最佳适配器。The virtual protocol driver may also include a best adapter selector that determines a best adapter for communication based on information provided by the link state detector.
从物理适配器接收的包可被无条件地发送到所述虚拟适配器,并且将被发送到物理适配器的包可被发送到被确定的最佳适配器。Packets received from a physical adapter may be sent unconditionally to the virtual adapter, and packets to be sent to a physical adapter may be sent to the determined best adapter.
附图说明 Description of drawings
通过下面结合附图对实施例进行的描述,本发明的这些和/或其他方面和优点将会变得清楚和更易于理解,其中:These and/or other aspects and advantages of the present invention will become clearer and easier to understand through the following description of embodiments in conjunction with the accompanying drawings, wherein:
图1是传统网络驱动程序系统的方框图;Figure 1 is a block diagram of a conventional network driver system;
图2是传统网络驱动程序的方框图;Figure 2 is a block diagram of a traditional network driver;
图3是根据本发明实施例的网络驱动程序系统的方框图;3 is a block diagram of a network driver system according to an embodiment of the invention;
图4是图3中显示的中间驱动程序的方框图;Figure 4 is a block diagram of the intermediate driver shown in Figure 3;
图5A和图5B是示出根据本发明实施例的虚拟驱动程序加载过程的流程图;5A and FIG. 5B are flowcharts showing a virtual driver loading process according to an embodiment of the present invention;
图6是示出根据本发明实施例的连接操作的流程图;和FIG. 6 is a flow chart illustrating a connection operation according to an embodiment of the present invention; and
图7是示出根据本发明实施例的断开操作的流程图。FIG. 7 is a flowchart illustrating a disconnection operation according to an embodiment of the present invention.
具体实施方式 Detailed ways
现在对本发明实施例进行详细的描述,其示例表示在附图中,其中,相同的标号始终表示相同部件。下面通过参照附图对实施例进行描述以解释本发明。Embodiments of the invention will now be described in detail, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments are described below in order to explain the present invention by referring to the figures.
在下文中,将参照附图更充分地描述本发明,附图中显示了本发明的实施例。Hereinafter, the invention will be described more fully with reference to the accompanying drawings, in which embodiments of the invention are shown.
图3是根据本发明实施例的网络驱动程序系统的方框图。FIG. 3 is a block diagram of a network driver system according to an embodiment of the present invention.
根据本实施例,实际迷你端口驱动程序仅与包括在互联网驱动程序中的虚拟协议驱动程序绑定。虚拟迷你端口驱动程序被产生,虚拟协议驱动程序与该虚拟迷你端口驱动程序绑定。然后诸如TCP/IP的实际协议驱动程序仅与该虚拟迷你端口驱动程序绑定。因此,实际协议驱动程序仅用来自虚拟驱动程序的信息得到连接状态的信息,并通过虚拟驱动程序发送和接收所有包。According to this embodiment, the actual miniport driver is only bound to the virtual protocol driver included in the Internet driver. A virtual miniport driver is generated, and a virtual protocol driver is bound to the virtual miniport driver. The actual protocol drivers such as TCP/IP are then only bound to this virtual miniport driver. Therefore, the actual protocol driver only uses information from the virtual driver to get information about the state of the connection and sends and receives all packets through the virtual driver.
参照图3,网络驱动程序系统包括根据本实施例的中间驱动程序400、NIC 350和360、802.3迷你端口驱动程序330、802.11迷你端口驱动程序340、协议驱动程序310、和NDIS 320。Referring to FIG. 3, the network driver system includes an
中间驱动程序400包括在下级的虚拟协议驱动程序420和在上级的虚拟迷你端口驱动程序410。即,在处于中间驱动程序400的下级的虚拟协议驱动程序420与迷你端口驱动程序330和340之间的相互关系中,中间驱动程序400具有协议驱动程序的功能,并且在处于中间驱动程序400的上级的虚拟迷你端口驱动程序410与协议驱动程序310之间的相互关系中,中间驱动程序400具有迷你端口驱动程序的功能。虚拟迷你端口驱动程序410好像是用于协议驱动程序310的适配器。产生虚拟适配器以防止TCP/IP协议驱动程序的会话由于实际物理适配器的断开信息而被断开。即,从实际物理适配器到协议驱动程序310的断开信息的传输可通过在中间驱动程序400中进行过滤而被防止。因此,TCP会话被连续地维持。The
此外,如果存在两个实际物理适配器,那么由于两个IP地址必须被分别分配给该两个适配器,所以通信的连续性不能被保证。因此,中间驱动程序400被用作链路到该两个物理适配器的虚拟适配器。因此,由于位于协议驱动程序310上的应用层(未显示)与一个虚拟适配器通信,所以该应用层不关心位于虚拟驱动程序下的物理适配器的类型和状态。Furthermore, if there are two actual physical adapters, since two IP addresses must be assigned to the two adapters respectively, continuity of communication cannot be guaranteed. Thus,
因此,在中间驱动程序400中,可改变包路由路径。即,在中间驱动程序400中,基于情况选择通信介质,并且经由物理适配器发送和接收包。因此,有线和无线通信几乎可被实时切换,而不影响协议驱动程序310。Therefore, in the
图4是图3所示的中间驱动程序400的方框图。FIG. 4 is a block diagram of the
参照图4,中间驱动程序400包括虚拟迷你端口驱动程序410和虚拟协议驱动程序420。Referring to FIG. 4 , the
虚拟迷你端口驱动程序410包括虚拟适配器控制器411。虚拟适配器控制器411产生虚拟适配器并控制该虚拟适配器以便协议驱动程序310与该虚拟适配器绑定并使用该虚拟适配器。The virtual miniport driver 410 includes a virtual adapter controller 411 . The virtual adapter controller 411 generates a virtual adapter and controls the virtual adapter so that the protocol driver 310 binds to the virtual adapter and uses the virtual adapter.
此外,当虚拟协议驱动程序420被绑定到物理适配器时,每个物理适配器的属性被设置。这里,虚拟适配器控制器411将相同的地址设置到每个绑定的物理适配器。当执行设置时,在有线LAN的情况下,包过滤值被设置为不加区分模式,在该模式中所有包被接受,并且在无线LAN中,包过滤值被设置为直接/多点传送/广播模式,如通常所使用的情况。虚拟适配器的MAC地址被设置为无线LAN的MAC地址。即,在有线LAN的情况下,不加区分模式被设置并且有线LAN的MAC地址看起来没有被设置,并且在无线LAN的情况下,由于使用了一般模式,所以虚拟适配器的MAC地址依赖于无线LAN的MAC地址。因此,在这两种情况下,在协议驱动程序310这方面,仅仅无线LAN的MAC地址呈现出被设置。Additionally, when the
通过使用相同的MAC地址可防止为了更新集线器地址解析协议(ARP)表而重新传输ARP包。此外,当使用动态主机配置协议(DHCP)来执行动态地址分配时,通过作为DHCP使用的一个选项,MAC地址被用来对PC区分。在这种情况下,因为DHCP服务器由于连接的PC使用相同的MAC地址而将它们识别为相同的PC,所以虚拟适配器可毫无问题地使用在DHCP环境中。此外,当根据使用MAC地址的自动配置而分配互联网协议版本6(IPv6)地址时,在下一代互联网IPv6中,由于MAC地址都是相同的,所以可以毫无问题地执行地址分配。Using the same MAC address prevents retransmission of ARP packets in order to update the hub's Address Resolution Protocol (ARP) table. In addition, when dynamic address assignment is performed using the Dynamic Host Configuration Protocol (DHCP), the MAC address is used to differentiate the PCs by being an option used by the DHCP. In this case, since the DHCP server recognizes the connected PCs as the same PC because they use the same MAC address, the virtual adapter can be used without problems in a DHCP environment. Furthermore, when an Internet Protocol version 6 (IPv6) address is assigned according to automatic configuration using a MAC address, in the next-generation Internet IPv6, since the MAC addresses are all the same, address assignment can be performed without problems.
当虚拟适配器控制器411从上层中的协议驱动程序请求信息时,虚拟适配器控制器411将由最佳适配器选择器421选择的最佳适配器信息报告给上层中的协议驱动程序。即,虚拟适配器控制器411选择下层链路状态信息并将该选择的信息报告给上层中的协议驱动程序。此外,当虚拟适配器控制器411将包发送到物理适配器时,虚拟适配器控制器411使用由最佳适配器选择器421选择的最佳适配器的绑定句柄来发送这些包。When the virtual adapter controller 411 requests information from the protocol driver in the upper layer, the virtual adapter controller 411 reports the optimal adapter information selected by the optimal adapter selector 421 to the protocol driver in the upper layer. That is, the virtual adapter controller 411 selects the lower layer link state information and reports the selected information to the protocol driver in the upper layer. Furthermore, when virtual adapter controller 411 sends packets to physical adapters, virtual adapter controller 411 uses the binding handle of the best adapter selected by best adapter selector 421 to send these packets.
虚拟协议驱动程序420包括最佳适配器选择器421,链路状态检测器422、和适配器绑定单元423。The
最佳适配器选择器421根据从链路状态检测器422输入的有线或无线LAN的连接信息来确定用于通信的物理适配器。The optimal adapter selector 421 determines a physical adapter for communication based on the connection information of wired or wireless LAN input from the link state detector 422 .
链路状态检测器422检测有线或无线LAN的链路状态信息并将检测到的链路状态信息输出到最佳适配器选择器421。The link state detector 422 detects link state information of wired or wireless LAN and outputs the detected link state information to the optimal adapter selector 421 .
适配器绑定单元423绑定所有激活的适配器并产生绑定列表424。适配器绑定单元423包括用于控制绑定的物理适配器的绑定句柄。在本实施例中,适配器绑定单元423包括用于有线LAN的802.3绑定句柄425和用于无线LAN的802.11绑定句柄426。每个绑定句柄类似于用于虚拟适配器与下级中的迷你端口驱动程序进行通信的密钥。此外,当适配器绑定单元423接收包时,它无条件地将这些包发送到虚拟适配器。The adapter binding unit 423 binds all activated adapters and generates a binding list 424 . The adapter binding unit 423 includes binding handles for controlling bound physical adapters. In this embodiment, the adapter binding unit 423 includes an 802.3 binding handle 425 for wired LAN and an 802.11 binding handle 426 for wireless LAN. Each binding handle is like a key used by the virtual adapter to communicate with the miniport driver in the lower level. Furthermore, when the adapter binding unit 423 receives packets, it unconditionally sends these packets to the virtual adapter.
图5A和图5B是示出根据本发明实施例的使用DriverEntry功能初始化中间驱动程序400的过程的流程图。DriverEntry功能为ARP分配包池和缓冲池,注册用于迷你端口驱动程序330和340的驱动程序句柄以及用于协议驱动程序310的协议句柄,并且向NDIS320通知所述驱动程序句柄与所述协议句柄相关联。图5A示出初始化中间驱动程序400的过程。5A and 5B are flowcharts illustrating a process of initializing the
参照图5A,在操作510中,中间驱动程序400的初始化从调用DriverEntry功能开始,该功能通过OS作为中间驱动程序400的进入点来操作。Referring to FIG. 5A , in
在操作520中,虚拟适配器控制器411绑定802.3适配器。每当虚拟适配器控制器411绑定物理适配器时,虚拟适配器数据结构被产生以存储物理适配器的信息。因此,物理适配器的数量是多少,就有相同数量的数据结构被产生。该虚拟适配器数据结构与上层中的实际协议驱动程序绑定。通过将数据结构与物理适配器绑定来获得物理适配器的绑定句柄。In
虚拟适配器数据结构中的绑定句柄数据结构存储下级中的多个数据结构的列表。The binding handle data structure in the virtual adapter data structure stores a list of multiple data structures in the subordinate.
在802.3适配器绑定过程中,802.3有线LAN适配器的包过滤属性在操作521中被设置为不加区分模式。不加区分模式下的适配器接受它接收到的所有包。During the 802.3 adapter binding process, the packet filtering attribute of the 802.3 wired LAN adapter is set to an indiscriminate mode in
在操作522中,有线LAN适配器的地址被设置为802.11层2无线LAN适配器的MAC地址。In
因此,802.3有线LAN适配器具有802.11无线LAN适配器的MAC地址,并可接收通过有线LAN输入的所有包。Therefore, the 802.3 wired LAN adapter has the MAC address of the 802.11 wireless LAN adapter, and can receive all packets input through the wired LAN.
在操作530中,虚拟适配器控制器411绑定802.11适配器。In
在操作531中,802.11无线LAN适配器的包过滤属性被设置为直接、多点传送、或广播模式,如通常所使用的情况。In
在直接模式下,被发送到特定机器的帧具有分配为目的地址的目的机器的物理地址(以太网地址)。具有该物理地址的机器接受该帧,其它机器不接受该帧。In direct mode, frames sent to a specific machine have the physical address (Ethernet address) of the destination machine assigned as the destination address. The machine with that physical address accepts the frame, other machines do not.
在多点传送模式下,被发送到一批特定机器的帧(多点传送帧)具有分配为目的地址的多点传送地址。这批特定机器形成多点传送组。因此,包括在该多点传送组中的每一台机器可接受该帧。即使NIC不属于该多点传送组,它仍可被编程从而进入这样的多点传送模式,在该模式下,所有多点传送帧被接受。In multicast mode, frames sent to a batch of specific machines (multicast frames) have a multicast address assigned as the destination address. This particular batch of machines forms a multicast group. Therefore, every machine included in the multicast group can accept the frame. Even if the NIC does not belong to the multicast group, it can still be programmed to enter a multicast mode where all multicast frames are accepted.
在广播模式下,被发送到网络中的所有机器的帧被广播到具有目的地址“0xffffff”的网络。该目的地址“0xffffff”被视为帧广播地址。在广播模式下的NIC接受具有目的地址“0xffffff”的所有帧。通常,所有NIC被配置以便广播帧能被接受。In broadcast mode, frames sent to all machines in the network are broadcast to the network with destination address "0xffffff". The destination address "0xffffff" is regarded as a frame broadcast address. A NIC in broadcast mode accepts all frames with destination address "0xffffff". Normally, all NICs are configured so that broadcast frames can be accepted.
在为所有物理适配器执行了绑定之后,虚拟适配器控制器411在操作540中产生虚拟适配器,并在操作550中初始化该虚拟适配器。虚拟适配器的初始化包括:通过分配绑定句柄数据结构来存储绑定句柄信息;产生绑定句柄列表;和将绑定的适配器的绑定句柄信息和点信息存储在该绑定句柄列表中。After binding is performed for all physical adapters, the virtual adapter controller 411 generates a virtual adapter in
参照图5B,在操作560中,使用虚拟协议驱动程序420来查询连接状态。Referring to FIG. 5B, in
包括在已经接收所述查询的虚拟协议驱动程序420中的链路状态检测器422在操作570中检测802.3连接状态信息和802.11连接状态信息,并将该检测到的连接状态信息发送到最佳适配器选择器421。The link state detector 422 included in the
在操作580中,最佳适配器选择器421选择最佳适配器。当有线LAN和无线LAN两者都被连接时,由于有线LAN更快,所以有线LAN被选择作为最佳适配器,当没有有线LAN被连接时,无线LAN被选择作为最佳适配器。最佳适配器选择器421将该选择的最佳适配器的信息发送到虚拟适配器控制器411。In
在操作590中,虚拟适配器控制器411映射接收的被选择的最佳适配器的信息。然后,中间驱动程序400准备好进行通信。In
图6是示出根据本发明实施例的连接操作的流程图。FIG. 6 is a flowchart showing a connection operation according to an embodiment of the present invention.
参照图6,当在操作601中802.3有线LAN和802.11无线LAN都被断开时,如果在操作602中产生连接事件,则在操作603中虚拟迷你端口驱动程序410将连接状态报告给上层中的协议驱动程序310。上层协议驱动程序310在操作604中确定连接的适配器是否是802.3适配器,并且如果该连接的适配器是802.3适配器,则在操作607中上层协议驱动程序310用802.3有线LAN进行通信。当用802.3有线LAN进行通信时,如果在操作605中产生了802.11连接事件,则在操作606中更新802.11连接状态信息。Referring to FIG. 6, when both the 802.3 wired LAN and the 802.11 wireless LAN are disconnected in
如果在操作604中连接的适配器是802.11适配器而不是802.3适配器,则在操作608中802.11适配器信息被映射到虚拟适配器。在操作609中,上层协议驱动程序310用802.11无线LAN进行通信。If the connected adapter in
当用802.11适配器进行通信时,如果在操作610中产生了802.3连接事件,则在操作611中802.3适配器信息被映射到虚拟适配器。在操作612中,上层协议驱动程序310用802.3有线LAN进行通信。When communicating with an 802.11 adapter, if an 802.3 connection event is generated in
图7是示出根据本发明实施例的断开操作的流程图。FIG. 7 is a flowchart illustrating a disconnection operation according to an embodiment of the present invention.
参照图7,当在操作701中上层协议驱动程序310用802.3有线LAN进行通信时,如果在操作702中产生断开事件,则在操作703中虚拟适配器控制器411确定断开的适配器是否是802.3适配器,并且如果该断开的适配器是802.3适配器,则在操作704中802.11适配器信息被重新映射到虚拟适配器。然后,在操作705中,上层协议驱动程序310用802.11无线LAN进行通信。Referring to FIG. 7, when the upper layer protocol driver 310 communicates with the 802.3 wired LAN in
如果断开的适配器不是802.3适配器,则在操作706中检查802.3有线LAN的连接状态。If the disconnected adapter is not an 802.3 adapter, the connection status of the 802.3 wired LAN is checked in
如果发现802.3有线LAN是连接的,则在操作707中上层协议驱动程序310用802.3有线LAN进行通信。If the 802.3 wired LAN is found to be connected, the upper layer protocol driver 310 communicates with the 802.3 wired LAN in
如果发现802.3有线LAN是断开的,则在操作708中虚拟迷你端口驱动程序410将断开状态报告给上层协议驱动程序310,并且在操作709中802.3适配器信息被重新映射到虚拟适配器。然后,802.3有线LAN和802.11无线LAN都处于断开状态。If the 802.3 wired LAN is found to be disconnected, the virtual miniport driver 410 reports the disconnection status to the upper layer protocol driver 310 in
如上所述,根据本发明的实施例,产生用于异类通信介质的唯一的虚拟适配器,并且一个IP地址被分配给该产生的虚拟适配器。当有线LAN和无线LAN都被连接时,高速的有线LAN被使用,并且如果该有线LAN被断开,则断开被自动检测并且包被重新路由到无线LAN。因此,诸如TCP/IP的协议驱动程序仅仅识别虚拟适配器。因此,由于即使端口地址改变IP地址也不改变,所以可保持连续的会话。As described above, according to the embodiment of the present invention, a unique virtual adapter for a heterogeneous communication medium is generated, and an IP address is assigned to the generated virtual adapter. When both the wired LAN and the wireless LAN are connected, the high-speed wired LAN is used, and if the wired LAN is disconnected, the disconnection is automatically detected and packets are rerouted to the wireless LAN. Therefore, protocol drivers such as TCP/IP only recognize virtual adapters. Therefore, since the IP address does not change even if the port address changes, a continuous session can be maintained.
即,由于TCP/IP会话以相同的IP地址被保持,所以从有线LAN到无线LAN的无缝换手是可行的。此外,由于使用相同的MAC地址,所以用由DHCP分配的IP地址,通信连续性被保证。此外,在下一代互联网IPv6中,在无状态自动配置环境下可进行无缝通信,在所述环境中,根据MAC地址产生IPv6地址。That is, since the TCP/IP session is maintained at the same IP address, seamless handover from wired LAN to wireless LAN is possible. Furthermore, since the same MAC address is used, communication continuity is ensured with the IP address assigned by DHCP. Furthermore, in the next-generation Internet IPv6, seamless communication is possible in a stateless autoconfiguration environment in which an IPv6 address is generated from a MAC address.
通过从计算机可读介质运行程序,本发明可被实现在通用计算机中,所述计算机可读介质包括但不限于以下存储介质,诸如磁存储介质(ROM、RAM、软盘、磁带等)、光可读介质(CD-ROM、DVD等)、和载波(通过互联网的传输)。本发明可被实现为具有在其中实现了计算机可读程序代码单元的计算机可读介质,以使许多经由网络而连接的计算机系统实现分布式处理。用于实现本发明的功能性程序。代码和代码段可由本发明所属的技术领域中的程序员容易地推导出。The present invention can be implemented in a general-purpose computer by executing a program from a computer-readable medium including, but not limited to, a storage medium such as a magnetic storage medium (ROM, RAM, floppy disk, magnetic tape, etc.), an optically Read media (CD-ROM, DVD, etc.), and carrier waves (transmission via the Internet). The present invention can be implemented as a computer-readable medium having computer-readable program code elements embodied therein to enable distributed processing over many computer systems connected via a network. Functional programs for realizing the present invention. Codes and code segments can be easily derived by programmers in the technical field to which the present invention pertains.
尽管已参照其优选实施例显示和描述了本发明,但本领域的技术人员应该理解,在不脱离由所附权利要求限定的本发明的精神和范围的情况下,可对本发明进行形式和细节上的各种改变。这些优选实施例应该仅仅被认为是描述意义上的,而不是为了限制的目的。因此,本发明的范围不是由本发明的详细描述所限定,而是由所附权利要求限定,该范围内的所有差别将被解释为被包括在本发明中。While the invention has been shown and described with reference to its preferred embodiments, it will be understood by those skilled in the art that changes may be made in form and detail thereof without departing from the spirit and scope of the invention as defined by the appended claims. various changes. These preferred embodiments should be considered in a descriptive sense only and not for purposes of limitation. Therefore, the scope of the invention is defined not by the detailed description of the invention but by the appended claims, and all differences within the scope will be construed as being included in the present invention.
尽管已显示和描述了本发明的一些实施例,但本领域的技术人员应该理解,在不脱离由所附权利要求及其等同物限定其范围的本发明的原理和精神的情况下,可对这些实施例进行改变。While a few embodiments of the present invention have been shown and described, it should be understood by those skilled in the art that changes may be made without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents. These examples vary.
Claims (18)
Applications Claiming Priority (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020040073299 | 2004-09-14 | ||
| KR20040073299 | 2004-09-14 | ||
| KR10-2004-0073299 | 2004-09-14 | ||
| KR10-2004-0102304 | 2004-12-07 | ||
| KR1020040102304 | 2004-12-07 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1764139A CN1764139A (en) | 2006-04-26 |
| CN100423503C true CN100423503C (en) | 2008-10-01 |
Family
ID=36748101
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2005101028876A Expired - Fee Related CN100423503C (en) | 2004-09-14 | 2005-09-14 | Communication adapter switching method and device |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR100667783B1 (en) |
| CN (1) | CN100423503C (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100736933B1 (en) * | 2004-09-14 | 2007-07-10 | 삼성전자주식회사 | Control method of mobile terminal |
| US8422513B2 (en) * | 2008-05-23 | 2013-04-16 | Nokia Siemens Networks Oy | Providing station context and mobility in a wireless local area network having a split MAC architecture |
| US9276768B2 (en) | 2008-05-23 | 2016-03-01 | Nokia Solutions And Networks Oy | Providing station context and mobility in a wireless local area network having a split MAC architecture |
| CN101895524B (en) * | 2009-05-21 | 2014-06-25 | Tcl集团股份有限公司 | LINUX-based method and network equipment enabling application program to access Internet |
| KR101996896B1 (en) * | 2014-12-29 | 2019-07-05 | 삼성전자주식회사 | Method for sharing resource using a virtual device driver and electronic device thereof |
| CN107306432A (en) * | 2016-04-18 | 2017-10-31 | 中兴通讯股份有限公司 | A kind of method for switching network, device and terminal |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1292534A (en) * | 1999-10-01 | 2001-04-25 | 北方电讯网络有限公司 | Switching method and system between two kinds of network access technology |
| US6314525B1 (en) * | 1997-05-13 | 2001-11-06 | 3Com Corporation | Means for allowing two or more network interface controller cards to appear as one card to an operating system |
| CN1490991A (en) * | 2002-10-18 | 2004-04-21 | 华为技术有限公司 | Methods for Virtual Ethernet Adapter Cards |
| CN1518275A (en) * | 2003-01-24 | 2004-08-04 | ���ǵ�����ʽ���� | Docking Station for Laptops |
-
2004
- 2004-12-07 KR KR1020040102304A patent/KR100667783B1/en not_active Expired - Fee Related
-
2005
- 2005-09-14 CN CNB2005101028876A patent/CN100423503C/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6314525B1 (en) * | 1997-05-13 | 2001-11-06 | 3Com Corporation | Means for allowing two or more network interface controller cards to appear as one card to an operating system |
| CN1292534A (en) * | 1999-10-01 | 2001-04-25 | 北方电讯网络有限公司 | Switching method and system between two kinds of network access technology |
| CN1490991A (en) * | 2002-10-18 | 2004-04-21 | 华为技术有限公司 | Methods for Virtual Ethernet Adapter Cards |
| CN1518275A (en) * | 2003-01-24 | 2004-08-04 | ���ǵ�����ʽ���� | Docking Station for Laptops |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1764139A (en) | 2006-04-26 |
| KR100667783B1 (en) | 2007-01-11 |
| KR20060024758A (en) | 2006-03-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20060056446A1 (en) | Communication adapter switching method and apparatus | |
| US10375015B2 (en) | Methods and system for allocating an IP address for an instance in a network function virtualization (NFV) system | |
| US7007079B2 (en) | Systems and methods for uniquely identifying a network by correlating the network's name with the application programming interface of transport protocol and the connectivity type of the network | |
| EP3316532B1 (en) | Computer device, system and method for implementing load balancing | |
| JP4542688B2 (en) | How to switch between network access technologies | |
| US7299294B1 (en) | Distributed traffic controller for network data | |
| US6732186B1 (en) | High availability networking with quad trunking failover | |
| US6728780B1 (en) | High availability networking with warm standby interface failover | |
| US7895348B2 (en) | Virtual dispersive routing | |
| JP4587446B2 (en) | NETWORK SYSTEM, SWITCH DEVICE, ROUTE MANAGEMENT SERVER, ITS CONTROL METHOD, COMPUTER PROGRAM, AND COMPUTER-READABLE STORAGE MEDIUM | |
| US6718383B1 (en) | High availability networking with virtual IP address failover | |
| US10768958B2 (en) | Using virtual local area networks in a virtual computer system | |
| US6195688B1 (en) | Computer system, program product and method of communicating internetworking data over a master-slave communication link | |
| CN106559451B (en) | User migration method and device | |
| US6778540B1 (en) | Facility for forwarding data from a network adapter to a router partition without internet protocol (ip) processing | |
| JP2002368763A (en) | Network device, server device, client device, network IP address assigning method and program | |
| JP7152665B2 (en) | Information processing device, information processing system, and setting program | |
| CN100423503C (en) | Communication adapter switching method and device | |
| US6970920B2 (en) | Methods, systems and computer program products for communicating with unconfigured network devices on remote networks | |
| CN1894935A (en) | Ip address management | |
| US7089334B2 (en) | Intelligent network interface port for visiting computers | |
| CN116781701A (en) | Message processing method, device, electronic equipment and storage medium | |
| KR100608037B1 (en) | Dynamic Allocation of Internet Protocol Addresses | |
| US20080056263A1 (en) | Efficient transport layer processing of incoming packets | |
| Kim et al. | A new seamless handoff mechanism for wired and wireless coexistence networks |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C17 | Cessation of patent right | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081001 Termination date: 20100914 |
