Operating System - HP-UX
1833780 Members
2178 Online
110063 Solutions
New Discussion

sin6_len missing in sockaddr_in6 on HPUX.

 
SOLVED
Go to solution
Manish_33
Advisor

sin6_len missing in sockaddr_in6 on HPUX.

Hello friends,

I could not find a field sin6_len in sockaddr_in6 on HPUX. How is this implemented then....however this field is present on other platforms.

Below is the sockaddr_in6 defined on AIX 5.3
struct sockaddr_in6 {
u_char sin6_len;
u_char sin6_family;
u_int16_t sin6_port;
u_int32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id; /* set of interfaces for a scope */
};


On HPUX it is defined as
struct sockaddr_in6 {
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id; /* scope of sin6_addr */
};



Is there any equivalent for this field on HPUX ??

Thanks in advance.
2 REPLIES 2
rick jones
Honored Contributor
Solution

Re: sin6_len missing in sockaddr_in6 on HPUX.

The sin6_len field of the AIX sockaddr_in6 may be an AIX-specific thing. If I look at the sockaddr_in6 for Solaris 10 it reads:

struct sockaddr_in6 {
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
};

and if I look on "Linux" it shows:

struct sockaddr_in6 {
unsigned short int sin6_family; /* AF_INET6 */
__u16 sin6_port; /* Transport layer port # */
__u32 sin6_flowinfo; /* IPv6 flow information */
struct in6_addr sin6_addr; /* IPv6 address */
__u32 sin6_scope_id; /* scope id (new in RFC2553) */
};
there is no rest for the wicked yet the virtuous have no pillows
Manish_33
Advisor

Re: sin6_len missing in sockaddr_in6 on HPUX.

Thanks Rick,

Hmmm......true if it is not present of any other OS's then it must be something specific to AIX. So we need to take care of that in our appliation itself.