LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2005, 01:25 PM   #1
sonika_singhi
Member
 
Registered: Oct 2004
Location: india
Distribution: fedora core
Posts: 34

Rep: Reputation: 15
Unhappy how to delay and drop the packet


i want to manipulate some of the fields of the packet at ip-layer at Gateway machine and want to send the manipulated packet to the
destination lying in some other network

so i want to delay and drop those packets.
could anyone tell pls, how to do that through C program
using any inbuilt functions

-----------thanx--------------------------------
 
Old 03-30-2005, 02:51 PM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

I've never done networking through C programmation... but I've just seen an iptables target that could help if you agree to do a part of this in shell script.

There's a target called u32 which seems to enable you to match packets given any bit pattern in the header (http://www.netfilter.org/documentat...ions-HOWTO.html)... thus you should be able redirect the packets you've previously modified.
 
Old 03-30-2005, 02:52 PM   #3
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
Bad link, fr_laz
 
Old 04-02-2005, 11:50 AM   #4
sonika_singhi
Member
 
Registered: Oct 2004
Location: india
Distribution: fedora core
Posts: 34

Original Poster
Rep: Reputation: 15
Thumbs down seriously in need of -the link is not getting open

seriously i need some accurate soluttion for my previous
problem,
the link is not working.
If anyone know any c code for delaying and dropping packets at gateway
pls let me know
 
Old 04-02-2005, 04:55 PM   #5
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Sorry ! Here it is :
http://www.netfilter.org/documentati...ons-HOWTO.html

but u32 filters may only solve a part of your problem : I don't think you can modify packets, only match them
 
  


Reply



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
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 08:21 AM
iptables - drop all -> allow needed OR allow all -> drop specific lucastic Linux - Security 5 12-21-2004 02:07 AM
packet reordering and delay using libipq shinkm Linux - Networking 0 09-08-2004 12:22 AM
drop packet in router becky_starr Programming 0 02-17-2004 08:43 AM
send-queue problem packet drop jorgen Linux - Networking 0 02-07-2004 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration