From: Kurt Van Dijck <kurt.van.dijck@eia.be>
To: Wolfgang <wutz@unterderbruecke.de>
Cc: linux-can@vger.kernel.org
Subject: Re: sendmsg
Date: Wed, 8 Feb 2012 09:46:02 +0100 [thread overview]
Message-ID: <20120208084602.GA412@e-circ.dyndns.org> (raw)
In-Reply-To: <loom.20120207T160415-497@post.gmane.org>
Hey Wolfgang,
On Tue, Feb 07, 2012 at 03:11:13PM +0000, Wolfgang wrote:
> Hi Kurt,
>
> I am back working a little my gw.
>
> As the defined in the j1939-21 the maximum dlc is 1785.
Yes.
This stack also supports the Extended Transport Protocol as defined
in iso11783-6, which extends to several MegaBytes...
>
> static struct {
> int pkt_len;
> } s = {
> .pkt_len = 1024,
> };
>
> buf = malloc(s.pkt_len);
>
> recvmsg(sockfd, &msg, 0);
>
> Did I get that right, that a dlc more than 1024 bytes is not possible with
> recvmsg or sendmsg.
That is not a limitation of recvmsg or sendmsg. 1024 in jspy.c is just
a decent default. Via options a different (bigger) packet size can be selected.
For a complete explanation, man 2 recvmsg, look for MSG_TRUNC.
That will explain what happens when I supply a buffer to recvmsg that is smaller
than the packet I'm receiving. The received packet is then truncated.
> For my application I won't need so many data
Most application don't need such packets ....
> but for understanding the code!
Very well!
>
> Kind regards,
> Wolfgang
>
>
> I forget to mention, that I set s.pkt_len = 1785 and it seemed to work with
> sendmsg and recvmsg. But UIO_MAXIOV is defined as 1024, so what do I get wrong?
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-02-08 8:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 13:26 recv list Kurt Van Dijck
2012-01-09 16:35 ` Wolfgang
2012-01-10 8:51 ` Kurt Van Dijck
2012-01-10 10:45 ` Wolfgang
2012-01-10 15:23 ` Kurt Van Dijck
2012-01-11 16:06 ` promiscuous mode Wolfgang
2012-01-12 15:37 ` bridge Kurt Van Dijck
2012-01-12 15:23 ` recv list Wolfgang
2012-01-12 15:43 ` Kurt Van Dijck
2012-01-12 18:08 ` bridging with can-gw - was " Oliver Hartkopp
2012-01-13 11:12 ` bridging with can-gw Kurt Van Dijck
2012-01-13 11:31 ` Wolfgang
2012-01-16 10:04 ` MSG_DONTROUTE Wolfgang
2012-01-16 13:31 ` MSG_DONTROUTE Kurt Van Dijck
2012-01-16 15:28 ` sendmsg Wolfgang
2012-01-16 15:36 ` sendmsg Kurt Van Dijck
2012-02-07 14:21 ` max dlc Wolfgang
2012-02-07 15:11 ` sendmsg Wolfgang
2012-02-08 8:46 ` Kurt Van Dijck [this message]
2012-02-16 9:58 ` How to get the DA Wolfgang Wagner
2012-02-16 19:49 ` Kurt Van Dijck
2012-02-24 15:23 ` Transport Protocol Wolfgang Wagner
2012-02-27 14:05 ` Kurt Van Dijck
2012-02-28 10:46 ` Transport Protocol: example Kurt Van Dijck
2012-02-28 15:21 ` Wolfgang Wagner
2012-02-28 16:26 ` Kurt Van Dijck
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=20120208084602.GA412@e-circ.dyndns.org \
--to=kurt.van.dijck@eia.be \
--cc=linux-can@vger.kernel.org \
--cc=wutz@unterderbruecke.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.