× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dear Scott,
        It worked. Thanks your help, 

Best regards,

Vengoal Chang

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, April 24, 2003 1:43 PM
To: Midrange Systems Technical Discussion
Subject: Re: Does AS/400 include socket API rresvport() ?



rresvport() is not a standard.  It's not part of any ISO or POSIX
standard
to my knowledge, it's just a BSD extension...   you won't find it on
every
platform, if you want your routines to be portable, don't use it.

To get a fixed port number, just call socket() followed by bind()
(before calling connect() you need to call bind())

The only time rresvport() acts a little differently than just calling
socket & bind is if you specify a port number of zero.

In the case of port zero... rresvport() will auto-assign a port number
within the "restricted port number" range (i.e. ports btw 512 & 1023).
You can achieve this on OS/400 by calling bind() in a loop, until it is
successful...

I don't know why the ldap_init() API makes reference to rresvport.  I
would guess that the documentation was written the same way for multiple
operating systems, and IBM just didn't change it.


On Thu, 24 Apr 2003, Vengoal Chang wrote:

> Dear All,
>       I have a request for fixed socket client port number. Socket
default 
> assign random port for connection used. I want to fixed socket client 
> port number on AS/400. I found a function rresvport() on AIX can do 
> the function. I only found the word "rresvport()" on information 
> center ldap API , the ldap_init()--Perform an LDAP Initialization 
> Operation 
> http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/ldap_init.
> ht
> m
>
> Document include call rresvport() function, But I could not found the 
> API with API finder and not list in Socket API. Could someone teach me

> how do I fixed socket client port number on AS/400 ?
>
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.