From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Raw Sockets + Userland TCP Kernel Resetting Packet
Date: Wed, 25 Nov 2015 17:25:16 +0100 [thread overview]
Message-ID: <20151125162516.GA4235@grml> (raw)
In-Reply-To: <CABESvY1crKRsyQnpjtMKjDTD0XdgcUirLS2op9BmczF+NOExMQ@mail.gmail.com>
Hi!
On 10:57 Wed 25 Nov , Bradley Falzon wrote:
> Hi,
>
> I'm writing a program to assist in learning/debugging tcp stacks, it
> creates a raw socket and replicates an exceedingly simple tcp stack. By
> which I mean, it sends and receives packets, setting correct flags,
> payloads etc.
>
> One difficulty I've come across, after I've created a raw socket and sent
> my syn packet, when the syn+ack packet arrives from the peer, my program
> receives it fine - but the kernel also resets the connection.
You might be able to use the tun/tap device. It basically creates a network
interface with a file descriptor of your program being the other side of it.
See Documentation/networking/tuntap.txt (in the kernel source) for more
details.
Is this an option for you?
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
prev parent reply other threads:[~2015-11-25 16:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 0:27 Raw Sockets + Userland TCP Kernel Resetting Packet Bradley Falzon
2015-11-25 16:25 ` michi1 at michaelblizek.twilightparadox.com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151125162516.GA4235@grml \
--to=michi1@michaelblizek.twilightparadox.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).