Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating a TCP header

2 views
Skip to first unread message

Arun Sudhakaran

unread,
Mar 15, 2004, 4:25:37 AM3/15/04
to
Hi,

Id like to know how to create a custom TCP packet using C. Could u
plz point me to the right direction. Im pretty confused as to wht to search
on the net. Id found something about spoofing. What exactly id like to know
is when i create a socket program, the tcp headers are generated by the
kernel right? So how do u set the options etc on it. Hope to get a reply
ASAP, coz im tied with a project and ive run into a wall..

Regards
Arun


Barry Margolin

unread,
Mar 15, 2004, 4:02:52 PM3/15/04
to
In article <lEe5c.6676$V11....@news-binary.blueyonder.co.uk>,
"Arun Sudhakaran" <aru...@hotmail.com> wrote:

> Hi,
>
> Id like to know how to create a custom TCP packet using C. Could u

See the chapter on "Raw Sockets" in "Unix Network Programming, Vol.1" by
W. Richard Stevens.

> plz point me to the right direction. Im pretty confused as to wht to search
> on the net. Id found something about spoofing. What exactly id like to know
> is when i create a socket program, the tcp headers are generated by the
> kernel right? So how do u set the options etc on it. Hope to get a reply
> ASAP, coz im tied with a project and ive run into a wall..

If you're not using raw sockets, you use setsockopt() to set the options
that the standard sockets API supports.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Arun Sudhakaran

unread,
Mar 15, 2004, 8:09:57 PM3/15/04
to
Thank Barry

The info u'd provided was very helpful :-)

Regards
Arun


"Barry Margolin" <bar...@alum.mit.edu> wrote in message
news:barmar-A2BE03....@comcast.ash.giganews.com...

0 new messages