On 24/05/07, Lenin <[EMAIL PROTECTED]> wrote:
Am implementing a packet filter in solaris 9. Am able to create a STREAMS 
module and insert it between the IP and NIC. Am able to see the upstream and 
downstream messages flowing through my module.

How do i extract the IP addresses from mblk_t in case of downstream messages ? 
I need to extact the destination IP address and do some processing based on 
that. Can some one throw me some light on how to get this done ?


Well, you need to be aware of DLPI and also the IP fast-path
mechanisms that are used to send packets down. From IP you should be
seeing packets in fast-path format, that is simple chains of M_DATA
blocks (with no M_PROTO on the front).
Assuming you're using an ethernet NIC and you're not using a VLAN then
you simply need to skip the 14 byte ethernet header to get at the IP
packet.

 Paul

--
Paul Durrant
http://www.linkedin.com/in/pdurrant
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to