[comp.protocols.iso.dev-environ] ts2sunlink problem

daved@eds.com (04/05/91)

Hi,

I'm trying to write a simple send/recv routine at the TSAP
and am experiencing a problem using the tsap libraries, ts2sunlink
in particular. I'm using a GOSIP v2 addressing format and taddr2str()
returns:
        '0400'H/GOSIP=80fffd00000001000069ffff0400000300

The error message is:
        TConnRequest: Congestion at TSAP
and the contents of td->td_data is
        sendto failed: Arg list too long

I have traced the error down to the sendto() in TConnect of the
ts2sunlink module which appears as follows:
        sendto (tb -> tb_fd, data, cc, 0, (struct sockaddr *) t,
                sizeof (TP_MSG_CONNECT))

I have noticed that the size of TP_MSG_CONNECT and thus t is 254,
whereas the size of struct sockaddr is only 16 (the standard sockaddr
length). My guess is that sendto doesn't like forcing 254 bytes into
16! Note that the socket() and bind() routines from tp4open() return
without error. 

Is there a Sunlink header file or something that I need to use to
compensate for the larger OSI address or is this a bug? (Note that 
my program runs fine over TCP/IP, i.e. when ts2sunlink is not required.)
Any suggestions are appreciated.

Dave DiGiorgio