Discarding Packets from LAN programatically

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.

Discarding Packets from LAN programatically

Postby suezkhan » Wed Feb 15, 2006 12:15 pm

somebody plz let me know how i can stop or discard a packet over LAN using C. i mean is there any liberary or Header file which should i use in order to discard suppose SYN packets not to reach a specific application.
actually i am working on a firewall type application which would discard either TCP or othere packets on the basis of a policy. so is there any way out here to deal such situation..
God Bless You
suezkhan
Cadet
 
Posts: 1
Joined: Wed Feb 15, 2006 12:07 pm
WLM: suezkhan
Location: Abbottabad

Postby Qadri-409 » Wed Feb 15, 2006 2:02 pm

M Shahzad Qadri
Qadri-409
Battalion Havaldaar Major
 
Posts: 286
Joined: Sun May 09, 2004 4:16 pm
WLM: qadri409
Yahoo Messenger: shahzadqadri409
Location: Peshawar

Postby blackdaemon » Thu Feb 16, 2006 12:13 pm

salam:

work on netfilters library, its same library as used by iptables!. provides you all the functionalities with its hooks placed at all major nodes of the network stack. Kindly refer to following link:

http://www.linuxjournal.com/article/7184

yes ofcourse you'll need to write your module/driver for it, trustme its not as hard as it sounds especially after reading this >> www.tldp.org/LDP/lkmpg/2.4/lkmpg.pdf

Finally you'l get tremendous resources at www.kernelnewbies.org it really helped me out & im sure you'l benefit equally from it.
I think, therefore i am!
blackdaemon
Naik
 
Posts: 53
Joined: Wed Jan 04, 2006 3:51 pm
Website: http://www.phclub.org
Location: Quetta, Pakistan


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron