[Info-vax] Help wanted : Porting code from Linux to VMS
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Wed Jan 23 17:11:31 EST 2019
On 2019-01-23 21:25:29 +0000, Stephen Hoffman said:
> On 2019-01-23 20:56:53 +0000, Marc Van Dyck said:
>
>> 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.
>
> Oh, that's hilarious.
Hilarious: no TLS on a security-relevant connection. If that was not clear.
Port the existing Linux code to OpenVMS, using C.
Rewriting this code doubles the size of the source code pool, and
doubles the effort that'll then be required to actually start fixing
problems such as a lack of TLS. Rewriting this app in Pascal is
building up technical debt.
This Pascal code is going to be twisted into OpenVMS pretty deeply if
you want to avoid using the C sockets API, too.
And forget about upgrading the connection security from anything that
can't reasonably access the OpenSSL APIs on OpenVMS and Linux. That's
going to be a substantial effort around external API mapping, from
Pascal, and that beyond figuring out how the OpenSSL APIs work.
If you absolutely have to rewrite this app into a language other than
C, then use Python or Java or some other portable language, and aim to
use the same or conditionalized code everywhere.
As for pointers to documentation resources and examples, those have
been provided by various folks in this thread. Beej's for discussions
of C sockets. VSI for whatever examples they have available.
TCPIP$EXAMPLES for what's there. The Freeware.
https://beej.us/guide/bgnet/
Don't expect to find very good examples of using sockets or $qio on
OpenVMS, as all of what I've encountered was written to address a
specific example case or a subset case, and tends to lack (for
instance) DNS integration.
But you already have working Linux code, which is the best starting point.
The 21st century C book is good for folks that are familiar with older
versions of C, and there are various introductory books around. Here's
a reasonable (free) book on C:
http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf
Other resources for C:
https://www.cprogramming.com/books/c.html
OpenVMS system services and RTL examples:
http://www.eight-cubed.com/examples.shtml
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list