From: DHAJOGLO <DHAJOGLO@smumn.edu>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: kernelnewbies@nl.linux.org, macnish@gmail.com, netdev@vger.kernel.org
Subject: cc: Re: skb configured but can't get data allocated
Date: Wed, 12 Sep 2007 18:41:41 -0500 [thread overview]
Message-ID: <200709122341418320c60701@mail.smumn.edu> (raw)
To All, Thanks for the help. I ended up adding my data packet after the ip headers and then updated the IP length:
/* Allocate space for our exp_packet data payload and set the data */
d_out = (struct exp_packet *)skb_put(skb,sizeof(struct exp_packet));
d_out->headbits = (reply<<4) & 0xF0;
d_out->sequence = pkthr.m_seq;
d_out->payload = htons(pkthr.p_hash);
/* adjust the total length of this IP packet */
iplen = skb->tail - (unsigned char *)skb->nh.iph;
iph->tot_len = htons(iplen);
ip_send_check(iph);
This is my first venture into the kernel!
On Wednesday, September 12, 2007 3:12 PM, Vlad Yasevich wrote:
>
>Date: Wed, 12 Sep 2007 16:12:37 -0400
>From: Vlad Yasevich
>To: DHAJOGLO <DHAJOGLO@smumn.edu>
>Subject: Re: skb configured but can't get data allocated
>
>You may want to read this page:
>http://vger.kernel.org/~davem/skb.html
>
>You will then see you problem.
>
>Essentially, you are writing your data into an
>area that is never sent.
>
>What you are end up is this:
>
>---------------------------------------------
>| your data| space | ll-header | IPv4 header|
>---------------------------------------------
>
>-vlad
reply other threads:[~2007-09-12 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200709122341418320c60701@mail.smumn.edu \
--to=dhajoglo@smumn.edu \
--cc=kernelnewbies@nl.linux.org \
--cc=macnish@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vladislav.yasevich@hp.com \
/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