From: Matt Laswell <laswell@infinite.io>
To: Konstantinos Schoinas <ece8537@upnet.gr>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] SSL-Packet
Date: Wed, 1 Aug 2018 08:14:38 -0500 [thread overview]
Message-ID: <CA+GnqAqL2eUyJLi5u1Jq6jdJamnr1fjQMHiBxbBvxtw4iBS2cQ@mail.gmail.com> (raw)
In-Reply-To: <f36e0ea7e3b57eefd0ca16583ed0e8bb@upnet.gr>
At a minimum, you're going to want to account for options in the TCP and IP
headers. A better way would be to do a little parsing of the IP header to
get the header length field, then using that to find the start of the TCP
header, etc.
--
Matt Laswell
infinite io, inc.
On Wed, Aug 1, 2018 at 5:20 AM, Konstantinos Schoinas <ece8537@upnet.gr>
wrote:
> Hello,
>
> Can somebody tell me how to cast a tcp packet to an ssl packet?
>
> I tried these lines but i dont things they are completely right.
>
> Struct ssl_record {
> uint8_t type;
> uint16_t version;
> uint16_t length;
> }
>
>
> tcp = (struct tcp_hdr *)(ip + 1);
> ssl = (struct ssl_record *)(tcp + 1);
>
>
next prev parent reply other threads:[~2018-08-01 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 10:20 Konstantinos Schoinas
2018-08-01 13:14 ` Matt Laswell [this message]
2018-08-01 13:31 ` Shyam Shrivastav
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=CA+GnqAqL2eUyJLi5u1Jq6jdJamnr1fjQMHiBxbBvxtw4iBS2cQ@mail.gmail.com \
--to=laswell@infinite.io \
--cc=ece8537@upnet.gr \
--cc=users@dpdk.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).