lkml.org 
[lkml]   [1997]   [Feb]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From"Tomás Restrepo" <>
Subjectsockaddr_in structure in in.h
DateSat, 22 Feb 1997 13:39:32 -0500
I have been looking at /usr/include/linux/in.h 
Can someone tell me why the structure sockaddr_in is defined different 
in kernel versions 2.1.26 and 2.0.29?
In 2.0.29 it is defined :

struct sockaddr_in {
  short int             sin_family;     /* Address family               */
  unsigned short int    sin_port;       /* Port number                  */
  struct in_addr        sin_addr;       /* Internet address             */
  /* Pad to size of `struct sockaddr'. */
  unsigned char         __pad[__SOCK_SIZE__ - sizeof(short int) -
                        sizeof(unsigned short int) - sizeof(struct
in_addr)];
};
and in 2.1.26 :

struct sockaddr_in
{
  sa_family_t           sin_family;     /* Address family               */
  unsigned short int    sin_port;       /* Port number                  */
  struct in_addr        sin_addr;       /* Internet address             */
  /* Pad to size of `struct sockaddr'. */
  unsigned char         __pad[__SOCK_SIZE__ - sizeof(short int) -
sizeof(unsign\ed short int) - sizeof(struct in_addr)];
};
Why is sin_family defined in 2.1.26 as sa_family_t and in 2.0.29 as short
int?

I was trying to compile fvwm2 but it would only compile if I used the one
in
2.0.29.

Any help would be appreciated.
+----------------------------------------------------+
        Tomás Restrepo Madrid
                     Winder
   trestrep@medellin.cetcol.net.co
+----------------------------------------------------+
\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2008