|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm writing a packet driver for my NIC confirmed to Packet Driver Spec
V1.09. But I have some questions about set_rcv_mode(). It's explained in the spec like the following: set_rcv_mode(handle, mode) AH == 20 int handle; BX int mode; CX Note that not all interfaces support all modes. The receive mode affects all packets received by this interface, not just packets associated with the handle argument. See the extended driver functions get_multicast_list() and set_multicast_list() for programming "perfect filters" to receive specific multicast addresses. Note that mode 3 is the default, and if the set_rcv_mode() function is not implemented, mode 3 is assumed to be in force as long as any handles are open (from the first access_type() to the last release_type()). Then I have one question. Is the HANDLE in set_rcv_mode(HANDLE, MODE) meaningless? After set_rcv_mode(HANDLE, MODE) is issued, all HANDLES got by access_type() will work under mode MODE ? The second question: When my NIC received one packet, should I issue the receiver() just according to the class, type, without considering MODE associated with the handle? If it is, why set_rcv_mode(handle, mode) is not set_rcv_mode(mode)£¿ The third question: When release_type(handle) is issued, should I reget the maximum MODE in the remaining HANDLES and reset the MODE into my NIC? Waiting for your reply sincerely, Thank you very much! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
In article <1163652469.447649.211450@m7g2000cwm.googlegroups. com>,
<zhangandfei@126.com> wrote: >I'm writing a packet driver for my NIC confirmed to Packet Driver Spec >V1.09. But I have some questions about set_rcv_mode(). It's explained >in the spec like the following: >set_rcv_mode(handle, mode) AH =3D=3D 20 > int handle; BX > int mode; CX >Note that not all interfaces support all modes. The receive mode >affects all packets received by this interface, not just packets >associated with the handle argument. See the extended driver functions >get_multicast_list() and set_multicast_list() for programming "perfect >filters" to receive specific multicast addresses. >Note that mode 3 is the default, and if the set_rcv_mode() function is >not implemented, mode 3 is assumed to be in force as long as any >handles are open (from the first access_type() to the last >release_type()). > >Then I have one question. Is the HANDLE in set_rcv_mode(HANDLE, MODE) >meaningless? After set_rcv_mode(HANDLE, MODE) is issued, all HANDLES >got by access_type() will work under mode MODE ? The handle was intended to identify which interface the change should take place on, but I don't know of any packet drivers that ever supported more than 1 interface per driver. When you change the mode on a card, it changes for ALL listeners (all callers to access_type()). >The second question: When my NIC received one packet, should I issue >the receiver() just according to the class, type, without considering >MODE associated with the handle? If it is, why set_rcv_mode(handle, >mode) is not set_rcv_mode(mode)=A3=BF Yes. Your receive logic should have nothing to do with the current receive mode. >The third question: When release_type(handle) is issued, should I reget >the maximum MODE in the remaining HANDLES and reset the MODE into my >NIC? You could if you want to, but I don't think any other packet driver has ever done that. Typically, when a packet driver client changes the receive mode, it will change the receive mode back before it releases its handles. I doubt any existing packet driver client will expect any other behavior. >Waiting for your reply sincerely, Thank you very much! Is this for an ethernet card or something else? Just curious... Patrick ========= For LAN/WAN Protocol Analysis, check out PacketView Pro! ========= Patrick Klos Email: patrick@klos.com Klos Technologies, Inc. Web: http://www.klos.com/ ================================================== ========================== |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
>
> Is this for an ethernet card or something else? Just curious... > yes, I'm writing a packet driver for an ethernet card. Thanks again. |
|
![]() |
| Outils de la discussion | |
|
|