isSelf is easy enough on some of the messages, since DeviceId (server
id?) is included in discovery packets. ?That filtering would be
possible with a simple function.

At one point there was discussion about getting a stable per-machine
ID, but I'm not sure if that was ever implemented. ?That could be used
to filter as well without having to bother with IP addresses.

On Tue, 2016-01-26 at 20:41 -0800, Thiago Macieira wrote:
> On Wednesday 27 January 2016 00:33:34 Morrow, Joseph L wrote:
> > Hi All,
> > 
> > I am wondering if anyone has already written any code to determine
> > if the
> > OCDevAddr of the sender (in the EH) is the local machine or not.
> > Also,
> > would it be difficult to ask that an "isSelf" flag be added to the
> > OCDevAddr struct? I think checking for "isSelf" would be much
> > easier at the
> > transport layer than in the application layer.
> > 
> > I am looking to ignore any requests from my own CLIENT_SERVER
> > application.
> 
> Hi Joey
> 
> Local machine does not imply self. It's possible that there are other
> stacks 
> running on the same machine and you should handle them as if they
> came from 
> someone else.
> 
> To do that, we need to enable IPV6_MULTICAST_LOOP.
> 
> However, you're right: it would be highly useful to know if a looped
> back 
> packet is one of ours. In fact, we should probably discard them and
> not pass 
> them on to the upper layers and the application. The problem is that
> this is 
> not an easy task in user space: each machine has probably quite a few
> IP 
> addresses.
> 
> Interesting challenge.

Reply via email to