9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jean Mehat jm@mime.univ-paris8.fr
Subject: [9fans] a problem with the 9p protocol?
Date: Sat,  4 Apr 1998 07:58:25 +0200	[thread overview]
Message-ID: <19980404055825.Gn1Dr8kQyreC3WKSXSnPR_YoSoB7tKRRL3PRVpTgIvE@z> (raw)



I suppose I missed something in the 9p protocol; has anyone any clue?

I was trying to make a program to filter the 9p messages, a la cfs. The
simplest filter has a simple loop:
	for(;;){
		if ((n = read(client, buffer, sizeof buffer)) < 0)
			error("read client");
		else
			dump("client->server", buffer, n);
		if (write(serveur, buffer, n) < n)
			error("write server");
		if ((n = read(serveur, buffer, sizeof buffer)) < 0)
			error("read server");
		else
			dump("serveur->client", buffer, n);
		if (write(client, buffer, n) < n)
			error("write client");
	}

If I run it with:
	ramfs -s
	filter
	mount /srv/filter /tmp/mnt
it seems to work: I can manipulate files in /tmp/mnt. But if I first mount and
then unmount the ramfs with:
	ramfs -s
	mount -c /srv/ramfs /tmp/mnt
	unmount /tmp/mnt
	filter
	mount /srv/filter /tmp/mnt
I get:
	client->server: Tsession tag 65535 		# (from dump)
	write server: inappropriate use of fd
	mount: mount /srv/filtre /tmp/mnt: fsession: i/o error during authentication

Where is the problem?




             reply	other threads:[~1998-04-04  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-04  5:58 Jean [this message]
1998-04-04 21:25 Russ

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=19980404055825.Gn1Dr8kQyreC3WKSXSnPR_YoSoB7tKRRL3PRVpTgIvE@z \
    --to=9fans@9fans.net \
    /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).