hebbargautham
Programmer
Hi,
I am facing an issue with libnsl's t_getinfo(). My application links to libnsl and calls this function. I am calling:
tfd=t_open("/dev/udp",O_RDWR,NULL);
t_getinfo(tfd,&ti);
where, ti is of struct t_info type.
If I try with a 32 bit build, the call to t_getinfo returns a proper t_info structure. However, when I do a 64 bit build (using +DD64 flag )and run the application, almost all fields of t_info structure seem to be having incorrect values. This behavior is consistant with both PARISC and IA64 platforms. I am using HP's ANSI C compiler.
The t_info structure has the below values when I ran a 32 bit build
tfd = 3
t_info.addr = 16
t_info.options = 65535
t_info.tsdu = 65507
t_info.etsdu = -2
t_info.connect = -2
t_info.discon = -2
t_info.servtype = 3
For a 64 bit build, I get the below output:
tfd = 3
t_info.addr = 68719542271
t_info.options = 281354717626366
t_info.tsdu = -4294967298
t_info.etsdu = 12884901891
t_info.connect = 0
t_info.discon = 1073746904
t_info.servtype = 1073997864
Can someone help me to find out what I am missing here. What could be the reason for this strange behavior of libnsl.
I am facing an issue with libnsl's t_getinfo(). My application links to libnsl and calls this function. I am calling:
tfd=t_open("/dev/udp",O_RDWR,NULL);
t_getinfo(tfd,&ti);
where, ti is of struct t_info type.
If I try with a 32 bit build, the call to t_getinfo returns a proper t_info structure. However, when I do a 64 bit build (using +DD64 flag )and run the application, almost all fields of t_info structure seem to be having incorrect values. This behavior is consistant with both PARISC and IA64 platforms. I am using HP's ANSI C compiler.
The t_info structure has the below values when I ran a 32 bit build
tfd = 3
t_info.addr = 16
t_info.options = 65535
t_info.tsdu = 65507
t_info.etsdu = -2
t_info.connect = -2
t_info.discon = -2
t_info.servtype = 3
For a 64 bit build, I get the below output:
tfd = 3
t_info.addr = 68719542271
t_info.options = 281354717626366
t_info.tsdu = -4294967298
t_info.etsdu = 12884901891
t_info.connect = 0
t_info.discon = 1073746904
t_info.servtype = 1073997864
Can someone help me to find out what I am missing here. What could be the reason for this strange behavior of libnsl.