[Info-vax] Help wanted : Porting code from Linux to VMS
Marc Van Dyck
marc.gr.vandyck at invalid.skynet.be
Wed Jan 23 15:56:53 EST 2019
Marc Van Dyck wrote :
> My job today is mainly system administration. But I have done software
> development in the past, and still enjoy doing some programming when the
> opportunity arises. What I have been asked to do today is however a bit
> more challenging for me than usual.
>
> It'll basically consist of porting C code written for a linux platform
> to OpenVMS. And it won't be the trivial 'copy the code and recompile'
> job :
>
> 1) it contains several system calls which I'll need to find an adequate
> equivalent for. I think I can manage that one, even if I know nothing
> about Linux.
>
> 2) I will port the code from C to Pascal, which is the only language I
> feel comfortable with. Not afraid by that one, have done it several
> times already.
>
> 3) The code contains a good dose of TCP/IP programming. And there I'm
> somewhat lost, because I never touched that in the past. So I'd
> appreciate a bit of help to get me started...
>
> Hence the following questions :
>
> 1) Is there any documentation about that ? How to write, on OpenVMS,
> code to establish a TCP/IP communication with another host ? Like what
> you would do with DECnet non transparent task to task communication ?
>
> 2) Any coding examples availabe somewhere, or that someone would agree
> to share ? Preferably in Pascal, but I'll understand if only C is
> available...
>
> 3) Are the TCP/IP calls definitions that I'll need to use available
> in pascal environment files somewhere ? Or SDL definitions that I
> could translate and compile ?
>
> If you want to send me something, the address is
> marc dot gr dot vandyck at skynet dot be.
>
> Many thanks in advance for all your hints !
Thanks for all the answers. There were so many that I won't try to
answer all of them individually. But I see some questions coming
back regularly about the background of this work, so here goes :
This will be running on VSI OpenVMS V8.4-2 on Itanium blade systems.
The thing that I will need to port/rewrite is something that has been
written more than 10 years ago. It involves communicating between two
systems, and if one of the two will be VMS, the other one will remain
Linux and on this one nothing can and will be changed. So I will have
to re-implement, one way or another, exactly the same protocol. I think
it is just raw tcp, but I haven't had a chance to look at the code yet.
But in any case, migrating to TLS or IPv6 is out of question, as I
don't control what I'm talking to at the other end.
The application to be ported looks very much like System Watchdog,
the polycenter product that was sold to CA decades ago. We have one
thing like that, developped in-house, for Linux and Windows, and now
I'm looking at the possibility to have a VMS agent. Now, I do not
want to re-write a full-fledged agent, because we already have a
monitoring system in place (Cockpit, for those who know it). I just
need to interface it so that it talks to our central console. We
already
do that today, using MQ-Series for transport, but my company wants to
stop using this product. We tried using SNMP traps also, but this is
UDP
so no guaranteed delivery, and we have indeed lost alarm messages
sometimes. So our next attempt would be to carve out the transport
layer
of the Linux agent of our watchdog, which seems to work well, and port
it to VMS.
I understand what you say about the rewrite in Pascal but I won't give
up. I think I can read C well enough to understand what it does. But
I don't want to use it for what I write myself. And, by the way, I'm
60, will retire in 5 years max, so making myself more marketable has
much less priority than doing things that I enjoy.
>From what I read in all your answers, it seems like TCP sockets will
probably be the way to go. So again, any code examples of that would
help me a lot, thank you very much in advance...
--
Marc Van Dyck
More information about the Info-vax
mailing list