[nylug-talk] constant port number for rstatd?
Chris Knadle
Chris.Knadle at coredump.us
Fri Dec 28 00:42:14 EST 2007
On Thursday 27 December 2007, C Thala wrote:
> On Dec 26, 2007 4:16 PM, Andres Pereira <andresp at gmail.com> wrote:
> > > How can I get it to stick to the same port?
> >
> > % man 8 rpc.statd
> > -o, --outgoing-port port
> > -p, --port port
> >
> > % cat /etc/sysconfig/nfs
> > STATD_PORT=10002
> > STATD_OUTGOING_PORT=10003
>
> Thanks for the info Andres, but we are using rpc.rstatd, which doesn't
> seem to have these options (it is called by "daemon rpc.rstatd" in the
> init script).
Assuming you eventually want to reprogram rstatd in order to get it to
start on a static port, I have a link handy which explains how to do what I
previously pointed out as "Possibility 2", which was to have rstatd set it's
own listening port.
Essentially I think it boils down to changing:
server_addr.sin_port = 0;
to:
server_addr.sin_port = htons(<port number>);
The code mods don't seem that bad; the sucky part is installing a modified
rstatd on all the boxes.
This is a page I've been referring to as I've been working on a networking
project:
http://www.cis.temple.edu/~ingargio/cis307/readings/unix4.html
-- Chris
--
Chris Knadle
Chris.Knadle at coredump.us
More information about the nylug-talk
mailing list