Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: 0
Unhappy Packet Capture Library

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 "" 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
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
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
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!


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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:39 AM.

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