From: Peng Yu <pengyu.ut@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Peng Yu via Libc-help <libc-help@sourceware.org>
Subject: Re: Where is setsockopt() defined?
Date: Wed, 3 Mar 2021 00:14:10 -0600 [thread overview]
Message-ID: <CABrM6wm3k8XRnWBCLvGNp8FfseF1QG=yEBkksDURRh4k8GiuHQ@mail.gmail.com> (raw)
In-Reply-To: <87h7ltw8f4.fsf@oldenburg.str.redhat.com>
> It's in sysdeps/unix/sysv/linux/setsockopt.c.
https://github.com/bminor/glibc/blob/21c3f4b5368686ade28d90d8c7d79c4c95c72c1b/sysdeps/unix/sysv/linux/setsockopt.c
There is not much code in this file. Based on the manpage of
setsockopt() (which refers to socket(7)), setsockopt() should be able
to process many different cases. So I'd expect many branch statements.
Where are they defined?
Things like INLINE_SYSCALL and SOCKETCALL are too complicated to
comprehend. How to understand what they do?
https://github.com/bminor/glibc/blob/21c3f4b5368686ade28d90d8c7d79c4c95c72c1b/sysdeps/unix/sysv/linux/sysdep.h#L42
https://github.com/bminor/glibc/blob/83908b3a1ea51e3aa7ff422275940e56dbba989f/sysdeps/unix/sysv/linux/socketcall.h#L85
--
Regards,
Peng
next prev parent reply other threads:[~2021-03-03 6:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 20:52 Peng Yu
2021-03-02 21:30 ` Florian Weimer
2021-03-03 6:14 ` Peng Yu [this message]
2021-03-03 6:40 ` Konstantin Kharlamov
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='CABrM6wm3k8XRnWBCLvGNp8FfseF1QG=yEBkksDURRh4k8GiuHQ@mail.gmail.com' \
--to=pengyu.ut@gmail.com \
--cc=fweimer@redhat.com \
--cc=libc-help@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).