LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-10-2009, 07:10 AM   #1
ajaakkola
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Question tun-device, raw sockets & networking stack


Hi guys,

I'm currently working with Python and sockets, and I've had a strange problem for a few days now.

Basically the idea is to:

1) Set up tun device
2) Route packets to that device
3) Read packet from there
4) Send that packet to eth0

My script "works" now, like I it does all those things that I mentioned. The problem is, I can't get any response from the system to my packets. If I for example test script with ping, wireshark shows that packets that I send are valid but system won't send any response.

The script with some comments is here: http://phew.pastebin.com/m2b3041dd

I have no idea if I'm doing something totally wrong, or if there is some strange feature in kernel that I just don't know.

Thanks,

Antti
 
  


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
raw sockets in c wee-face Programming 1 02-01-2007 09:35 AM
vnuml tun device /dev/net/tun not found. asalford Linux - Networking 1 01-30-2007 10:11 PM
Raw Sockets Srikanth0210 Programming 2 12-05-2005 03:22 AM
raw sockets and C wrongman Programming 3 05-04-2004 02:17 PM
raw sockets BashTin Programming 1 06-07-2003 06:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:47 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