LinuxQuestions.org
Visit Jeremy's Blog.
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 05-17-2004, 03:35 AM   #1
myself_rajat
LQ Newbie
 
Registered: May 2004
Location: India
Posts: 21

Rep: Reputation: 15
Using Raw Socket for UDP


Dear All,

I am in process of Path MTUD implementation, For that I am using UDP packets for probing purpose(not ICMP packets due to denial of service attack).
Since while sending I need to set the DF bit in IP header, I have to use Raw Socket, because if I go for Datagram Socket, it will give error.
So now I am using the following code,

sock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);

So now I am expecting that I will be able to receive ICMP error messages, as well as UDP packet as a response from corresponding server.

M I on the right direction or there is any chance for further modification.
 
  


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
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Socket Raw linuxanswer Programming 1 04-01-2004 09:43 PM
ping without raw socket linuxnw Linux - Networking 3 12-09-2003 11:57 PM
raw socket permition moonloader Linux - Networking 2 12-08-2003 09:20 AM
raw ipv6 socket example Steave Programming 0 06-27-2003 03:55 PM

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

All times are GMT -5. The time now is 09:34 AM.

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