ca.portal.admin

Re:Re: TCP/IP generic listener server

Discussion created by ca.portal.admin on Feb 21, 2006
Hi Onni,

I've tried the ACCEPT call, but when this is called, the
program to
goes in WAIT state.
I'm programming using COBOL option under VSE/ESA, the function ACCEPT is
sopported
under this environment.

Thank you,

Naval Espasa
Barcelona Stock Exchange


----- Original Message -----
From: ""Onni Kukkonen"" <onni.kukkonen@VEGASOFT.COM>
To: <IDMS-L@LISTSERV.IUASSN.COM>
Sent: Tuesday, February 21, 2006 12:33 PM
Subject: Re: TCP/IP generic listener server

Hi,

The ACCEPT call of Socket API should return the IP address as a part
of
sockaddr argument.

Onni Kukkonen
Vegasoft

-----Original Message-----
From: IDMS 3rd-party providers forum
[mailTo:IDMSVENDOR-L@LISTSERV.IUASSN.COM] On Behalf Of Naval Espasa
Sent: Tuesday, February 21, 2006 12:05 PM
To: IDMSVENDOR-L@LISTSERV.IUASSN.COM
Subject: TCP/IP generic listener server

Hi ALL,

I'm programming a TCP/IP generic listener server in COBOL. It
=
works pretty well,
but I need to get the remote host Ip address, and I don't know how get
=
it.

Has anyone else had this problem?

I'm in VSE/ESA V2R6 and IDMS R16 SP3

Thanks,

=20

Naval Espasa
Barcelona Stock Exchange
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: TCP/IP generic listener server
"I've tried GETPEERNAME and SOCKET-FUNCTION-INETNTOA, but the result that I
get is that:

F3 0072 IDMS DC016009 V2 T31608 SOCKADDR-LENGTH..00000016
F3 0072 IDMS DC016009 V2 T31608 SOCKADDR-FAMILY..0002
F3 0072 IDMS DC016009 V2 T31608 SOCKADDR-PORT ..0000
F3 0072 IDMS DC016009 V2 T31608 SOCKADDR-PORT ..0000
F3 0072 IDMS DC016009 V2 T31608 SOCKADDR-ADDR ..00000000
F3 0072 IDMS DC016009 V2 T31608 SOCKET-RETCD ..00000000
F3 0072 IDMS DC016009 V2 T31608 SOCKET-ERRNO ..00000000
F3 0072 IDMS DC016009 V2 T31608 SOCKET-RSNCD ..00000000
F3 0072 IDMS DC016009 V2 T31608 SOCKET-DESCRIPTOR.00000000
F3 0072 IDMS DC016009 V2 T31608 IP-ADDRESS-STRING ....... 0.0.0.0
F3 0072 IDMS DC016009 V2 T31608 IP-ADDRESS-LENGTH..00000015
F3 0072 IDMS DC016009 V2 T31608 RETURNED-IP-ADDRESS-LENGTH..0007

Maybe there is a CA's bug in GETPEERNAME, it seems to
return only FAMILY.

Thanks a lot,

Naval



----- Original Message -----
From: ""Cherlet, Gary (JTS)"" <Cherlet.Gary@SAUGOV.SA.GOV.AU>
To: <IDMS-L@LISTSERV.IUASSN.COM>
Sent: Tuesday, February 21, 2006 11:30 PM
Subject: Re: TCP/IP generic listener server


If you're using the ""generic listener"" you don't need to do the ACCEPT (that
is ""accept"" the connection request from the client) - that call has already
been done for you by the generic listener - by the time your program gets
control you can start issuing your TCP read/write socket calls. That's why
you went into a WAIT on a TCP/IP ecb when you issued the ACCEPT.

As mentioned in an earlier post you would use GETPEERNAME - in Cobol you
would then use the SOCKET-FUNCTION-INETNTOA socket call to convert the
network address to ""dot address"" form (i.e. nnn.nnn.nnn.nnn for display
purposes).

HTH - cheers - Gary

Gary Cherlet
Justice Technology Services
Telephone +61 (0)8 8226 5199
Facsimile +61 (0)8 8226 5311
Mobile +61 (0)41 333 1613
MailTo:cherlet.gary@saugov.sa.gov.au

This e-mail message and any attachments are qualified as follows:
Addressing: If you have received this e-mail in error, please advise by
reply e-mail to the sender. Please also destroy the original transmission
and its contents.
Confidentiality: This e-mail may contain confidential information which
also may be legally privileged. Only the intended recipient(s) may access,
use, distribute or copy this e-mail.
Individual Views: Unless otherwise indicated, the views expressed are those
of the sender, not Justice Technology Services.
Computer Viruses: It is the recipient's responsibility to check the e-mail
and any attached files for viruses.

Outcomes