『第 16 楼』:
使用 LLM 解释/回答一下
说一下我个人对 NDIS 和 Packet 驱动和理解。
NDIS 和 Packet 都是网卡驱动。
Packet 方式的驱动比较简单,一般都是一个可执文件,如 8139 网卡的 Packet 驱动就是“RtsPkt.com”,只要直接在命令提示符下运行“RtsPkt.com 0x60”就可以将驱动加载到内存中供应用程序使用了。“0x60”是中断号,当然还可以加一些其他的参数,如速度、总线号、设备号等等。在 Realtek 网站上是将 Packet 驱动归到 UNIX 系统下的,具体我也不太清楚。
而 NDIS 的驱动则比较复杂,一般都不是直接可以执行的程序,如 8139 网卡的NDIS 驱动就是“RtsNd.dos”,然后还有一个配置文件“Protocol.ini”,用来对一些具体参数进行设置,如驱动名、网卡速度、多网卡时驱动哪一个总线上的网卡等等。还有一些其他的文件,但不是关键,一般用于使用此驱动的应用程序安装此驱动时使用。NDIS 的驱动有多种版本,从 NDIS1 到 NDIS5。NDIS 方式的驱动比 Packet 方式的驱动更先进,所以微软在 WINDOWS 系统中则使用了 NDIS 方式的驱动。DOS下常用的是 NDIS2 的驱动,98 到 Xp 一般使用的是 NDIS5 的驱动。NDIS 的驱动加载,一种是在 CONFIG.SYS 文件中加载,像 IBM 的 DOS网络客户端软件就是用这种方式。另一种是应用程序自己调用驱动程序文件进行加载,如微软的 DOS网络客户端软件,就是在运行 Net.exe 程序时调用 .dos 文件进行驱动的加载的。
由于在 DOS 下没有统一网卡驱动,不同的应用程序,使用不同方式的驱动,所以要根根你具体运行的应用程序使用的是哪种方式的驱动,加载相应的网卡驱动程序,并不像 WINDOWS 下只要一次性加载完网卡驱动,所有的应用程序都可以使用网络了。
大多数的 DOS 下的网络程序,都使用 Packet 的驱动,当然是因为 Packet 的驱动比较简单。如 GHOST 的网络克隆功能,使用的是 Packet 的驱动,所以只要在运行 GHOST 之前加载了网卡的 Packet 驱动,就可以在 GHOST 中使用网络克隆功能了。FTP.EXE 程序也是使用 Packet 的驱动。
使用 NDIS2 驱动的典型软件就是微软的 DOS网络客户端软件了。IBM 的 DOS网络客户端软件也是使用 NDIS2 的驱动。
再说一下“Dis_Pkt.dos”程序。由于微软的 WINDOWS 系统统一使用了 NDIS 方式的驱动,所以有些网卡生产厂家就不再开发 DOS 下的 Packet 方式的驱动了,像使用非常厂泛的 Intel 的 Pro 100、Pro1000 网卡,Broadcom 的网卡,都没有 Packet 的驱动,但都有 NDIS2 的驱动。为了解决这个问题,于是就提供了一个折中的方案,将 NDIS2 的驱动转换成 Packet 的驱动,这就是“Dis_Pkt.dos”程序的作用。只要你驱动了网卡的 NDIS2 驱动,然后通过“Dis_Pkt.dos”这个程序,就可以为应用程序提供 Packet 的驱动了。
Last edited by LanCat on 2006-9-21 at 19:14 ]
Let me talk about my personal understanding of NDIS and Packet drivers.
Both NDIS and Packet are network card drivers.
The Packet - type driver is relatively simple. Generally, it is an executable file. For example, the Packet driver of the 8139 network card is "RtsPkt.com". You can directly run "RtsPkt.com 0x60" in the command prompt to load the driver into memory for application programs to use. "0x60" is the interrupt number. Of course, some other parameters can also be added, such as speed, bus number, device number, etc. On the Realtek website, the Packet driver is classified under the UNIX system, and I don't know the details specifically.
And the NDIS driver is more complex. Generally, it is not a directly executable program. For example, the NDIS driver of the 8139 network card is "RtsNd.dos", and there is also a configuration file "Protocol.ini" which is used to set some specific parameters, such as the driver name, network card speed, which network card on the bus to drive when there are multiple network cards, etc. There are some other files, but they are not the key. Generally, they are used when the application program using this driver installs this driver. There are multiple versions of NDIS drivers, from NDIS1 to NDIS5. The NDIS - type driver is more advanced than the Packet - type driver, so Microsoft uses the NDIS - type driver in the WINDOWS system. The commonly used one in DOS is the NDIS2 driver, and from 98 to Xp, the NDIS5 driver is generally used. For loading the NDIS driver, one way is to load it in the CONFIG.SYS file. For example, the IBM DOS network client software uses this way. Another way is that the application program itself calls the driver file for loading. For example, the Microsoft DOS network client software calls the.dos file to load the driver when running the Net.exe program.
Because there is no unified network card driver under DOS, different applications use different types of drivers. So you need to load the corresponding network card driver program according to the type of driver used by the specific application you are running. It is not like under WINDOWS where as long as the network card driver is loaded once, all applications can use the network.
Most network programs under DOS use the Packet driver, of course, because the Packet driver is relatively simple. For example, the network cloning function of GHOST uses the Packet driver. So as long as the Packet driver of the network card is loaded before running GHOST, the network cloning function can be used in GHOST. The FTP.EXE program also uses the Packet driver.
The typical software using the NDIS2 driver is the Microsoft DOS network client software. The IBM DOS network client software also uses the NDIS2 driver.
Let's talk about the "Dis_Pkt.dos" program. Because the Microsoft WINDOWS system uniformly uses the NDIS - type driver, some network card manufacturers no longer develop the Packet - type driver under DOS. For example, Intel's Pro 100, Pro1000 network cards, Broadcom network cards, etc., which are widely used, have no Packet driver but have NDIS2 drivers. To solve this problem, a compromise solution is provided. That is, converting the NDIS2 driver into a Packet driver, which is the function of the "Dis_Pkt.dos" program. As long as you drive the NDIS2 driver of the network card, and then through the "Dis_Pkt.dos" program, you can provide a Packet driver for the application program.
Last edited by LanCat on 2006-9-21 at 19:14 ]
|