sockaddr_in structure in in.h

=?ISO-8859-1?Q?Tom=E1s_Restrepo?= (trestrep@medellin.cetcol.net.co)
Sat, 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
+----------------------------------------------------+