C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 12-10-2003, 11:39 PM   #1
Registered User
 
Join Date: Dec 2003
Posts: 24
Packet Filter using Unix Socket

I had by mistake posted in the C programming board,

Packet Filter Using Unix Sockets

Please take a look at the link and help me out.

Thanks.
doraiashok is offline   Reply With Quote
Old 12-11-2003, 12:34 PM   #2
Yes, my avatar is stolen
 
anonytmouse's Avatar
 
Join Date: Dec 2002
Posts: 2,544
Do you need to call:
Code:
setsockopt(handle->fd, SOL_SOCKET, SO_ATTACH_FILTER, 
			       &fcode, sizeof(fcode))
Search: pf_packet packet filter
anonytmouse is offline   Reply With Quote
Old 12-12-2003, 08:14 AM   #3
Registered User
 
Join Date: Dec 2003
Posts: 24
With SO_ATTACH_FILTER you will have to specify the filter code but i want to block all IP packets and send only the packets, which may be useful.

(Definition of useful may be dependent on data and not on any header information)
doraiashok is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet processing in Socket programming, please help pumpkin Networking/Device Communication 5 05-28-2009 01:33 AM
Global Variables Taka C Programming 34 11-02-2007 03:25 AM
Problem while constructing IP packet and sending using socket() system call cavestine Networking/Device Communication 10 10-15-2007 05:49 AM
Datagram Unix socket problem karas C Programming 9 07-27-2006 10:08 AM
Packet Filter Using Unix Sockets doraiashok C Programming 3 12-12-2003 02:56 PM


All times are GMT -6. The time now is 10:42 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22