Networking Forums

Networking Forums > Computer Networking > Windows Networking > Question about modifing NDIS packet?

Reply
Thread Tools Display Modes

Question about modifing NDIS packet?

 
 
Rajesh Gupta
Guest
Posts: n/a

 
      06-23-2004, 09:46 PM
Hi everyone,

I am trying to modify the NDIS packet. Do i need to allocate new buffers?

I want to modify the destination IP address. I am doing the address mapping,
if i receive data for specific destination, i want to redirect that data to
go to another IP address. Do i need to allocate new buffers, copy all the
data from old packet, modify it and then send it again. Can i do the
following?

1. Query the NDIS packet.
2. Get the Virtual Address.
3. Modify the Header, with new IP and checksum.
4. Allocate new packet from my own pool.
5. Copy all the header information and OOB data.
6. Send that packet again.


Can i use the same buffer and packet. Or i will have to allocate new buffer
and packet if i am modifing the data in the packet.

Thanks in Advance

Rajesh


 
Reply With Quote
 
 
 
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      06-23-2004, 10:05 PM
In news:(E-Mail Removed),
Rajesh Gupta <(E-Mail Removed)> posted their thoughts, then I offered mine
> Hi everyone,
>
> I am trying to modify the NDIS packet. Do i need to allocate new
> buffers?
>
> I want to modify the destination IP address. I am doing the address
> mapping, if i receive data for specific destination, i want to
> redirect that data to go to another IP address. Do i need to allocate
> new buffers, copy all the data from old packet, modify it and then
> send it again. Can i do the following?
>
> 1. Query the NDIS packet.
> 2. Get the Virtual Address.
> 3. Modify the Header, with new IP and checksum.
> 4. Allocate new packet from my own pool.
> 5. Copy all the header information and OOB data.
> 6. Send that packet again.
>
>
> Can i use the same buffer and packet. Or i will have to allocate new
> buffer and packet if i am modifing the data in the packet.
>
> Thanks in Advance
>
> Rajesh



Not sure, but see if this helps:

Q. Can I modify a NDIS packet that I did not allocate myself? A. No.
http://www.ndis.com/faq/QA01030301.htm

NDIS_PACKET Discussion - Part 1 - NDIS Packet Data
http://www.ndis.com/papers/ndispacket/ndispacket1.htm

Look here for more info:
http://www.google.com/search?hl=en&i...fy+ndis+packet

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.
This posting is provided "AS-IS" with no warranties and confers no
rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================


 
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
Packet fragmentation question John E Windows Networking 4 04-10-2007 03:48 PM
Packet fragmentation question John E Home Networking 4 04-10-2007 03:48 PM
Receiver sensitivity- Packet Detection v/s Packet capture Vinay Wireless Internet 1 10-14-2005 01:50 AM
Packet filter statistics question chukie_egg Linux Networking 0 04-13-2005 10:00 AM
TCP/IP Packet Question Ryan Howell Linux Networking 3 07-26-2003 10:48 AM



1 2 3 4 5 6 7 8 9 10 11