Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How many packets in a PNET_BUFFER_LIST

Reply
Thread Tools Display Modes

How many packets in a PNET_BUFFER_LIST

 
 
Fredrik Jansson
Guest
Posts: n/a

 
      10-12-2007
Is there a way of telling how many actaul packets there are in a
NET_BUFFER_LIST?
Is there a packet (e.g. IP-packet, ARP request etc.) for every NET_BUFFER or
can a packet be divided on several NET_BUFFERS in the NET_BUFFER_LIST?

Brgds,
Fredrik

 
Reply With Quote
 
 
 
 
Calvin Guan
Guest
Posts: n/a

 
      10-16-2007
1 net_buffer contains 1 packet, it may span multiple MDLs.
1 or more net_buffer can be chained to a net_buffer_list.
1 or more net_buffer_list can be chained to a net_buffer_list with multiple
net_buffer_list.

given a net_buffer_list pointer, there is no magic way to figure out how
many packets it has. you will need to walk the entire list.

pkt_cnt =0;
for (current_nbl = nbl_passed_in;\
current_nbl != NULL;\
current_nbl = NET_BUFFER_LIST_NEXT_NBL(current_nbl)){

for (current_nb = NET_BUFFER_LIST_FIRST_NB(current_nbl);\
current_nb !=NULL;\
current_nb = NET_BUFFER_NEXT_NB(current_nb)) {
pkt_cnt +=1
}
}

--
Calvin Guan
Principal Engineer
Broadcom Corporation
Connecting Everything(r)

"Fredrik Jansson" <> wrote in message
news:3A50157C-1DF7-4EAE-A831-...
> Is there a way of telling how many actaul packets there are in a
> NET_BUFFER_LIST?
> Is there a packet (e.g. IP-packet, ARP request etc.) for every NET_BUFFER
> or can a packet be divided on several NET_BUFFERS in the NET_BUFFER_LIST?
>
> Brgds,
> Fredrik
>



 
Reply With Quote
 
Fredrik Jansson
Guest
Posts: n/a

 
      10-16-2007
Hi!

The answer "1 net_buffer contains 1 packet, it may span multiple MDLs.", was
what I was hoping for, many thanks!

/Fredrik


"Calvin Guan" <> wrote in message
news:...
>1 net_buffer contains 1 packet, it may span multiple MDLs.
> 1 or more net_buffer can be chained to a net_buffer_list.
> 1 or more net_buffer_list can be chained to a net_buffer_list with
> multiple net_buffer_list.
>
> given a net_buffer_list pointer, there is no magic way to figure out how
> many packets it has. you will need to walk the entire list.
>
> pkt_cnt =0;
> for (current_nbl = nbl_passed_in;\
> current_nbl != NULL;\
> current_nbl = NET_BUFFER_LIST_NEXT_NBL(current_nbl)){
>
> for (current_nb = NET_BUFFER_LIST_FIRST_NB(current_nbl);\
> current_nb !=NULL;\
> current_nb = NET_BUFFER_NEXT_NB(current_nb)) {
> pkt_cnt +=1
> }
> }
>
> --
> Calvin Guan
> Principal Engineer
> Broadcom Corporation
> Connecting Everything(r)
>
> "Fredrik Jansson" <> wrote in message
> news:3A50157C-1DF7-4EAE-A831-...
>> Is there a way of telling how many actaul packets there are in a
>> NET_BUFFER_LIST?
>> Is there a packet (e.g. IP-packet, ARP request etc.) for every NET_BUFFER
>> or can a packet be divided on several NET_BUFFERS in the NET_BUFFER_LIST?
>>
>> Brgds,
>> Fredrik
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetPrinterDataEx packets ferozf Windows Vista Networking 0 12-22-2006 12:00 PM
Ndis - indicating packets Michal Filka Windows Vista Drivers 1 07-25-2005 02:01 PM
to verify if USB packets are going through? M Taha Masood Windows Vista Drivers 0 07-22-2004 05:28 PM
Malformed TCP packets John Smith Windows Vista Drivers 4 07-21-2004 01:21 AM
packets sent/recieved Niklas Olsson Windows Vista Drivers 1 11-08-2003 05:22 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59