The HyperNews Linux KHG Discussion Pages

Feedback: Re: Raw sockets

Forum: The Linux Kernel Hackers' Guide
Re: How can I use RAW SOCKETS in UNIX? (Rami)
Date: Wed, 04 Jun 1997 13:15:33 GMT
From: <>

To use RAW sockets in Unix it it mandatory that one be a root . To create RAW socket just write: s=socket(AF_INET,SOCK_RAW,<protocol>). Then you can do anything you want with it (sending, receiving). However you have to perform all necessary operations, according to the protocol you use (create headers (IP+TCP(UDP,ICMP,...)) and make all neccessary negotiations (TCP: SYN->ACK->....RST....ACK....).