9P

From Wikipedia, the free encyclopedia

Jump to: navigation, search
The Internet Protocol Suite
Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP · IMAP · IRC · Megaco · MGCP · NNTP · NTP · POP · RIP · RPC · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · Telnet · TLS/SSL · XMPP · (more)
Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more)
Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more)
Link Layer
ARP · RARP · NDP · OSPF · Tunnels (L2TP) · PPP · Media Access Control (Ethernet, MPLS, DSL, ISDN, FDDI) · Device Drivers · (more)

9P (or the Plan 9 Filesystem Protocol or Styx), is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system. 9P encourages caching and also serving of synthetic files (e.g. /proc to represent processes), unlike NFS.

9P was revised for the 4th edition of Plan 9 under the name 9P2000 that contained various fundamental improvements. The latest version of Inferno also uses 9P2000. The Inferno file protocol was originally called Styx, but technically it has always been a variant of 9P.

Another revision called 9p2000.u which is modified to better support UNIX environments also exists, see v9fs 9p2000.u.

There is a server implementation of 9P for Unix called u9fs included in the Plan 9 distribution, and a kernel client driver for Linux as part of the v9fs project. 9P (and derivatives) have also found application in embedded environments, such as the Styx on a Brick project.

Contents

[edit] 9P server applications

Many of Plan 9's applications take the form of 9P servers; some particularly noteworthy examples:

  • acme: a user interface for programmers
  • rio: the Plan 9 window manager.
  • plumber: interprocess communication
  • wikifs: a wiki

[edit] Implementation

9p sends the following messages between clients and servers [1]. These messages correspond to the entry points in the Plan 9 vfs layer that a 9p server must implement.

version
Negotiate protocol version
error
Return an error
flush 
Abort a message
auth, attach 
Messages to establish a connection
walk 
Descend a directory hierarchy
create, open 
Prepare a fid for I/O on an existing or new file
read, write 
Transfer data from and to a file
clunk 
Forget about a fid
remove
Remove a file from a server
stat, wstat 
Inquire or change file attributes

[edit] See also

[edit] External links

[edit] References

  1. ^ 9p protocol
Personal tools