[Snort-devel] a problem

Fyodor fygrave at ...1...
Tue Nov 28 08:37:06 EST 2000

On Mon, Nov 27, 2000 at 09:07:11PM +0800, zhudx wrote:
> hi :
>    Snort is a very good things.but I think there has a bugs,it is in the log.c Lins 556:
> bcopy((const void *)srv,(void *)alertaddr.sun_path,strlen(srv)); /* we trust what we define */
> I think you want to copy the srv to the sun_path,but the first params is dest.do you think so?I modify it and test on my win2k plantform,it work fine.

No, first param is the source and the statement is quite correct:

char *srv = UNSOCK_FILE;

bcopy((const void *)srv, (void *)....);

see the manual for bcopy (althrough it's implementation might be broken on windows platform, as most of other stuff is):

BCOPY(3)	       FreeBSD Library Functions Manual 	      BCOPY(3)

     bcopy - copy byte string

     Standard C Library (libc, -lc)

     #include <string.h>

     bcopy(const void *src, void *dst, size_t len)

     The bcopy() function copies len bytes from string src to string dst. The
     two strings may overlap.  If len is zero, no bytes are copied.

>   I want to Send the Alert message to another mochine on the net runs syslogd,How can I get it?

Mike just implemented this feature as far as I have seen. :) 

PGP fingerprint = 56DD 1511 DDDA 56D7 99C7  B288 5CE5 A713 0969 A4D1

More information about the Snort-devel mailing list