Thread: how to block packets

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    how to block packets

    hi,
    i am trying to develop an application to block network packets(using c++)(as in a firewall), with the help of pcap library but only able to capture the packet not block it.

    can somebody suggest some solution to it, like which library to use??

    thanks in advance.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well knowing which OS and compiler you're using would be a start.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    missing info

    Quote Originally Posted by Salem View Post
    Well knowing which OS and compiler you're using would be a start.
    using ubuntu 8.10 and g++ compiler.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    It appears libpcap is just for capturing packets, and not controlling them, as you mentioned. You'll probably need a lower-level library. Look into iptables and netfilter, to see if you can interface with them to control (reject) packets.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling C in Visual Studio 2005
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-16-2009, 04:25 AM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM
  5. pointers
    By fanaonc in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 02:18 AM