RE: Socket filtering
RE: Socket filtering
- Subject: RE: Socket filtering
- From: "Sanjay Mishra" <email@hidden>
- Date: Thu, 27 Apr 2006 18:52:07 +0530
- Thread-topic: Socket filtering
There are two situations here. I don't know which you are talking about.
One, each such session should have complete pattern matching. If any
part of the data is not matched I have to drop complete data. Second, It
is possible that the task can be done in multiple sessions.So I will
retain the pattern matched data and will discard only unmatched data. I
will close my side of the connection if I don't get any data for a long
time. Better still I will send "Are you alive?" message to him now and
then if I am not getting any data for some specified time and I am
expecting data to come.
Which kind of situation is this?
--Sanjay
-----Original Message-----
From: darwin-kernel-bounces+samishra=email@hidden
[mailto:darwin-kernel-bounces+samishra=email@hidden] On
Behalf Of Eric Long
Sent: Thursday, April 27, 2006 5:20 AM
To: Josh Graessley
Cc: Darwin Kernel
Subject: Re: Socket filtering
>
> I'm not sure what you are trying to accomplish here.
>
> When the socket is closed, any uninjected data should be discarded.
>
> You are asking for a hook to use as a warning that the socket will
> close. Do you mean a hook before the client calls close on the socket?
> I'm not sure how one would predict such a thing. A hook after the
> client calls close seems useless because the client is done calling
> read, so there is no point in injecting data.
Well, I'm scanning data looking for pattern matches. I don't
necessarily know the protocol, so I don't know for sure how much data to
expect. If I find a partial match in a packet, I want to see if the
next packet contains the end of the data I am looking for, so I swallow
the packet and wait for
the next packet. If it turns out there is no next packet, I've got a
problem. If I discard the data, I've messed up the stream. I need to
properly reinject it before the socket closes.
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
m
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden