mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bernd Petrovitsch <bernd@firmix.at>
To: Karel Kulhavy <clock@twibright.com>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>, linux-kernel@vger.kernel.org
Subject: Re: description of struct sockaddr
Date: Tue, 28 Dec 2004 22:11:46 +0100	[thread overview]
Message-ID: <1104268307.8367.15.camel@gimli.at.home> (raw)
In-Reply-To: <20041226164051.GA5529@beton.cybernet.src>

On Sun, 2004-12-26 at 16:40 +0000, Karel Kulhavy wrote:
> On Tue, Nov 23, 2004 at 11:11:31PM +0100, Jan Engelhardt wrote:
> > >Hello
> > >
> > >man netdevice talks about struct sockaddr, but neither describes it,
> > >nor provides a link to descriptio, nor the "SEE ALSO" items
> > >(ip(7), proc(7), rnetlink(7)) provide the necessary information.
> > >
> > >"The hardware address is specified in a struct sockaddr".
> > 
> > I don't think so. The hardware address is, well, specific to the hardware (like
> > Ethernet, for example). IP/TCP/UDP however is not limited to Ethernet. And
> > 'sockaddr' clearly is something that does not deal with hardware.
> 
> It is a sentence from man netdevice. Should I send a bugreport to the manpage
> maintainer?

No. struct sockaddr basically holds only the common field "sa_family"
and an array of char which contains the hardware specific data
(see /usr/include/linux/socket.h). It is used by the socket API.
For different hardware types you have other structs, e.g. you have
struct sockaddr_in for IP sockets and struct sockaddr_un for Unix domain
sockets.
sockaddr_in has additionally to the common fields a field for the IP
address "sin_address" and "sin_port" for the port. sockaddr_un has
simply the field "sun_path" for the name in the filesystem.

Just grep for them under /usr/include...

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




  reply	other threads:[~2004-12-28 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 21:43 Karel Kulhavy
2004-11-23 22:11 ` Jan Engelhardt
2004-12-26 16:40   ` Karel Kulhavy
2004-12-28 21:11     ` Bernd Petrovitsch [this message]
2004-11-23 22:15 ` linux-os

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=1104268307.8367.15.camel@gimli.at.home \
    --to=bernd@firmix.at \
    --cc=clock@twibright.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®