From: Mike Waychison <Michael.Waychison@Sun.COM>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] convert udevsend/udevd to using datagram sockets
Date: Thu, 05 Feb 2004 02:08:08 +0000 [thread overview]
Message-ID: <4021A588.6060306@sun.com> (raw)
In-Reply-To: <40209893.8080109@sympatico.ca>
Chris Friesen wrote:
> Mike Waychison wrote:
>
>> The addrlen parameter should still be sizeof(saddr), regarless of the
>> contents of the abstract namespace address. The same would go for
>> the sendto command.
>
>
> Do you have any definitive references for this? I don't have any
> references at home, but this style is all over the web. If you give
> it the full length, then you waste time passing a bunch of zeros to
> the kernel and then hashing over them. As long as the length is the
> same on both sides, it should work just fine, no?
I stand corrected and indeed, this is the method used all over the
internet (heck, even docs.sun.com documents it as
sizeof(addr.sun_family) + strlen(addr.sun_path)).
I guess I'm so used to seeing sizeof(addr) in connects and binds that I
took it for a hard rule. Another thing that I wasn't clear on when I
posted was that I assumed that the abstract namespace used all 108 bytes
of sun_path. I've tested this and you are right in that the length does
infact differentiate the names. Sorry 'bout that :)
--
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
mailto: Michael.Waychison@Sun.COM
http://www.sun.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2004-02-05 2:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-04 7:00 [PATCH] convert udevsend/udevd to using datagram sockets Chris Friesen
2004-02-04 14:02 ` Kay Sievers
2004-02-04 15:34 ` chris_friesen
2004-02-04 21:06 ` Mike Waychison
2004-02-05 1:24 ` Chris Friesen
2004-02-05 2:08 ` Mike Waychison [this message]
2004-02-05 6:53 ` Chris Friesen
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=4021A588.6060306@sun.com \
--to=michael.waychison@sun.com \
--cc=linux-hotplug@vger.kernel.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).