On Thu, Sep 12, 2019 at 09:12:29AM -0300, Gustavo Rios wrote:
> I am writing a program to query my portmap server.
> I am using the getport routine. The parameters i am using is
>
> program = 100000
> version = 3
> protocol = 17
>
> And it returns the port 111.
>
> But when i change version from 3 to, say, 10
> It stills returns port 111.
>
> Should not it return another value ? I am querying a version that it
> is not registered .
>
> Thanks for clarifications.
The code in src/usr.sbin/portmap/portmap.c matches on program and protocol.
If it also finds a match on version, that port is retured, otherwise
a match on program and protocol is returned.
-Otto