linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* description of struct sockaddr
@ 2004-11-23 21:43 Karel Kulhavy
  2004-11-23 22:11 ` Jan Engelhardt
  2004-11-23 22:15 ` linux-os
  0 siblings, 2 replies; 5+ messages in thread
From: Karel Kulhavy @ 2004-11-23 21:43 UTC (permalink / raw)
  To: linux-kernel

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".

Where is struct sockaddr specified?

Cl<

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: description of struct sockaddr
  2004-11-23 21:43 description of struct sockaddr Karel Kulhavy
@ 2004-11-23 22:11 ` Jan Engelhardt
  2004-12-26 16:40   ` Karel Kulhavy
  2004-11-23 22:15 ` linux-os
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2004-11-23 22:11 UTC (permalink / raw)
  To: Karel Kulhavy; +Cc: linux-kernel

>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.

>Where is struct sockaddr specified?

Somewhere in the depths of /usr/include and your linux kernel tree.
Oh yeah, be warned, glibc is a #define hell when you're looking for sockaddr
stuff.


Jan Engelhardt
-- 
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: description of struct sockaddr
  2004-11-23 21:43 description of struct sockaddr Karel Kulhavy
  2004-11-23 22:11 ` Jan Engelhardt
@ 2004-11-23 22:15 ` linux-os
  1 sibling, 0 replies; 5+ messages in thread
From: linux-os @ 2004-11-23 22:15 UTC (permalink / raw)
  To: Karel Kulhavy; +Cc: linux-kernel

On Tue, 23 Nov 2004, Karel Kulhavy 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".
>
> Where is struct sockaddr specified?
>

How about /usr/include/sys/socket.h (for starters). If you can
actually find all the member names by following all the
included-includes, you probably get some kind of prize.
Note that the __SOCKADDR_ALLTYPES macro is absolutely
amazing. It's possible to have the pre-processor hide
everything, making trouble-shooting pure art!

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
  Notice : All mail here is now cached for review by John Ashcroft.
                  98.36% of all statistics are fiction.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: description of struct sockaddr
  2004-11-23 22:11 ` Jan Engelhardt
@ 2004-12-26 16:40   ` Karel Kulhavy
  2004-12-28 21:11     ` Bernd Petrovitsch
  0 siblings, 1 reply; 5+ messages in thread
From: Karel Kulhavy @ 2004-12-26 16:40 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

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?

Cl<

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: description of struct sockaddr
  2004-12-26 16:40   ` Karel Kulhavy
@ 2004-12-28 21:11     ` Bernd Petrovitsch
  0 siblings, 0 replies; 5+ messages in thread
From: Bernd Petrovitsch @ 2004-12-28 21:11 UTC (permalink / raw)
  To: Karel Kulhavy; +Cc: Jan Engelhardt, linux-kernel

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-28 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 21:43 description of struct sockaddr Karel Kulhavy
2004-11-23 22:11 ` Jan Engelhardt
2004-12-26 16:40   ` Karel Kulhavy
2004-12-28 21:11     ` Bernd Petrovitsch
2004-11-23 22:15 ` linux-os

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).