Problem
I want to be able to specify the port number of the remote ftp server within my program that uses the ftp_api(SLIB). Is this possible?
Solution
The ftp_api(SLIB) doesn't support setting the port number. It uses the port number that is specified for the ftp service in /etc/services.
An enhancement to ftp_api(SLIB) that supports this has been requested for a future release of the SCO OpenServer Development System.
A different port number can be used by changing the "ftp" entry in /etc/services. For example, if you want to use port number 7770, change:
ftp 21/tcpto:ftp 7770/tcpNOTE: Do this only if you do not use ftpd(ADMN) on your system.This modification causes ftpd(ADMN) to also use port number 7770 the next time inetd(ADMN) restarts, or the system is rebooted.
See also
The manual pages for ftp_api(SLIB), services(SFF) and inetd(ADMN).