For testing purpose, I downloaded the pfil code that you have given and
built it, installed the code and did put some debugs to retrieve the
Source and destination ip address [ to do filtering based on that ]. To
my surprise, the downstream messages come with different source IP
addresses [ shouldn't it be constant which is the solaris box's IP ? It
has a single NIC ]. 

I am in a fix and couldn't proceed further. I couldn't understand the
logic behind the changing of source IP address during the downstream
messages  ? 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 25, 2007 1:47 AM
To: Lenin Lakshminarayanan -X (lelakshm - HCL at Cisco)
Cc: [email protected]
Subject: Re: [networking-discuss] How to retrieve IP address from mblk_t

Lenin 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, I was going to say "look at what the pfil module used to do", but
once a file is removed from the source base (goes into the
"deleted_files" tree internally), it appears that we no longer ship it
out into CVS for opensolaris (there are no "Attic" directories that I
can see via the web interface, anyway.)

Instead you can have a look at the song and dance that IPFilter uses -
download http://coombs.anu.edu.au/~avalon/pfil-2.1.13.tar.gz
and look in the file "SunOS/pfildrv.c".  It's really an unpleasant thing
to be a STREAMS module between IP and NIC drivers.

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to