James Carlson wrote:
> Christophe Kalt writes:
> > syscall::connect:entry
> > {
> >   self->to  = (char *) copyin(arg1, arg2);
> >   self->ftp = ( self->to[0] == 0 && self->to[1] == 2 && self->to[3] == 21 ) 
> > ? 1 : 0;
> 
> Is this on SPARC or x86?  That expression is sensitive to byte order:
> it's assuming that sin_family is going to be in big-endian order,
> which is true only on SPARC.

Yes, i expected to have a problem with this, but my testing showed that this
works on both platforms.  To be honest, i'm not sure how this can be!

> (The port number in struct sockaddr_in is always big-endian, because
> it's in network byte order.)
> 
> Not testing self->to[2] for zero seems odd.

True!
forgot about it while fighting to get the script to work :-)


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to