LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-21-2010, 10:12 AM   #1
wxShayan
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Unhappy Packet Capture Library


Hi,
I want to port a VPN client from Windows to Linux. It consists of an arbitrary VPN protocol and a firewall. The VPN client uses a library named "WinpkFilter" from "ntkernels.com" which is not available in Linux. All that I need now is a neat library which can be replaced with "WinpkFilter". I found libpcab but it is just a packet sniffer. I worked with iptables and netfilter but it is unable to inject arbitrary packets (also i don't want to bind to an external application). I tried ndiswrapper but it is unable to load my driver in Linux. I reviewed the openvpn model (tap & tun) but it is not suitable for me. I tried raw sockets at the device driver, they are wonderful but I didn't find a way to drop unwanted packets! Please HHHEEELLLPPP me! Is there any packet sniffer and injector library with the ability of dropping unwanted packets in Linux (something like libnet, a kernel module, ...)?
 
Old 02-21-2010, 01:55 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
Why don't you combine two methods: raw sockets for generating packets and netfilter hooks for filtering?
 
Old 02-22-2010, 12:46 AM   #3
wxShayan
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Hi Mara and thanks for your reply,
NetFilter hook? What do you mean? Do you mean NetFilter library which I mentioned above? According to my knowledge, NetFilter works above iptables and it has two weaknesses:
1. It is working in IP layer and I need DataLink header information.
2. If someone or some application change iptables rules, it affects my VPN behavior!
 
  


Reply

Tags
capture, drop, packet


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get a packet capture using WireShark RN16 Linux - General 2 02-08-2009 12:21 PM
A packet filter using libipq which uses ether type field to capture the packet can26_manish Programming 2 10-16-2007 05:35 AM
how do i read the data in the packet that i have captured after packet capture? gajaykrishnan Programming 23 04-19-2006 05:09 AM
Ethereal Packet capture Help sucram2g Linux - Networking 2 07-20-2005 12:35 PM
Network packet capture avaya Linux - Newbie 2 10-14-2002 09:37 PM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration