9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <cross@math.psu.edu>
To: 9fans@cse.psu.edu
Subject: [9fans] Small patch to tftpd; command line announce strings.
Date: Wed, 22 Jan 2003 17:55:15 -0500	[thread overview]
Message-ID: <200301222255.h0MMtFw01079@augusta.math.psu.edu> (raw)

My new setup (which is still not on the Internet just yet, and probably
won't be for a few weeks at this point) is a little...weird.  I have
two interfaces bound to a single IP stack, one exposed to the net, one
not.  For a variety of reasons, this is more convenient than using
multiple stacks (in particular, I want to run services on both
interfaces, and listen doesn't seem to have a ``-x'' option, I don't
want to start everything twice, and I want to try and play some routing
tricks later where the internal interface will also answer requests
[from internal clients] for the external interface).  I'm running a
DHCP and tftpd server for internal clients, but I don't want any fool
with a tftp client to start downloading kernels from me.  DHCP I don't
care about since ip/dhcpd only answers for clients it knows about by
default, and the immediate subnet is pretty trustworthy.  The upshot
of all this is that I modified tftpd to add a ``-A'' option which takes
an announce string, so one can specify an interface to announce on.
E.g., ``ip/tftpd -A 'udp!192.168.1.4!69' '' sort of thing.  A diff in
diff -e format is below.  Are there any objections for adding this to
the distribution?

	- Dan C.

term% diff -e /n/sources/plan9/sys/src/cmd/ip/tftpd.c tftpd.c
102c
	sprint(buf, "%s/%s", net, a);
.
60a
	case 'A':
		a = ARGF();
		break;
.
58a
	a = "udp!*!69";
.
57c
	char *p, *a;
.
term% 


             reply	other threads:[~2003-01-22 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-22 22:55 Dan Cross [this message]
2003-01-23  1:22 ` geoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301222255.h0MMtFw01079@augusta.math.psu.edu \
    --to=cross@math.psu.edu \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).