Snort mailing list archives
Re: Snort and Unix-Socket
From: Dirk Geschke <Dirk_Geschke () genua de>
Date: Thu, 22 Nov 2001 09:50:04 +0100
[snip snip]if(listen(sockfd, 5) == -1) { fprintf(stderr, "Unable to listen on socket."); exit(EXIT_FAILURE); } while((connfd = accept(sockfd, (struct sockaddr *) &adress, &adrlen)) >= 0) {I don't think you need to && can call accept and listen on connection-less sockets (which SOCK_DGRAM is), all you need is to call recvfrom() on the socket.. Look through snort-devel or snort-users mailing list archives, I was posting a sample how to use unix sockets with snort while ago.
Correct. Both, the listen and accept command, would only work with streaming sockets, not with unix sockets. Unix sockets work like UDP connections... Remove the listen and replace the accept with recv(). Best regards Dirk -- +------------------------------------------------------------+ | Dr. Dirk Geschke | E-mail: geschke () genua de | | Gesellschaft fuer Netzwerk | Tel. : +49-(0)-89-991950-31 | | und Unix Administration mbH | Fax : +49-(0)-89-991950-99 | | 85551 Kirchheim / Germany | Raeter Stra/3e 26 | +------------------------------------------------------------+ _______________________________________________ Snort-users mailing list Snort-users () lists sourceforge net Go to this URL to change user options or unsubscribe: https://lists.sourceforge.net/lists/listinfo/snort-users Snort-users list archive: http://www.geocrawler.com/redir-sf.php3?list=snort-users
Current thread:
- Snort and Unix-Socket TSauter (Nov 21)
- Re: Snort and Unix-Socket Fyodor (Nov 21)
- Re: Snort and Unix-Socket Phil Wood (Nov 21)
- Re: Snort and Unix-Socket Phil Wood (Nov 21)
- Re: Snort and Unix-Socket Dirk Geschke (Nov 22)
- Re: Snort and Unix-Socket Phil Wood (Nov 21)
- Re: Snort and Unix-Socket Fyodor (Nov 21)