func (t *tauth) decode(b *buffer) {
	t.Authenticationfid = b.ReadFID()
	t.UserName = b.ReadString()
	t.AttachName = b.ReadString()
	t.UID = b.ReadUID()
}
decode implements encoder.decode.
package p9
import (
	"fmt"
	"math"
)
type ErrInvalidMsgType struct {
	msgType
}
func (e *ErrInvalidMsgType) Error() string {
	return fmt.Sprintf("invalid message type: %d", e.msgType)
}
type message interface {
	encoder
	fmt.Stringer
	typ() msgType
}
type payloader interface {
	FixedSize() uint32
	Payload() []byte
	SetPayload([]byte)
}
type tversion struct {
	MSize uint32
	Version string
}
func (t *tversion) decode(b *buffer) {
	t.MSize = b.Read32()
	t.Version = b.ReadString()
}
func (t *tversion) encode(b *buffer) {
	b.Write32(t.MSize)
	b.WriteString(t.Version)
}
func (*tversion) typ() msgType {
	return msgTversion
}
func (t *tversion) String() string {
	return fmt.Sprintf("Tversion{MSize: %d, Version: %s}", t.MSize, t.Version)
}
type rversion struct {
	MSize uint32
	Version string
}
func (r *rversion) decode(b *buffer) {
	r.MSize = b.Read32()
	r.Version = b.ReadString()
}
func (r *rversion) encode(b *buffer) {
	b.Write32(r.MSize)
	b.WriteString(r.Version)
}
func (*rversion) typ() msgType {
	return msgRversion
}
func (r *rversion) String() string {
	return fmt.Sprintf("Rversion{MSize: %d, Version: %s}", r.MSize, r.Version)
}
type tflush struct {
	OldTag tag
}
func (t *tflush) decode(b *buffer) {
	t.OldTag = b.ReadTag()
}
func (t *tflush) encode(b *buffer) {
	b.WriteTag(t.OldTag)
}
func (*tflush) typ() msgType {
	return msgTflush
}
func (t *tflush) String() string {
	return fmt.Sprintf("Tflush{OldTag: %d}", t.OldTag)
}
type rflush struct {
}
func (*rflush) decode(b *buffer) {
}
func (*rflush) encode(b *buffer) {
}
func (*rflush) typ() msgType {
	return msgRflush
}
func (r *rflush) String() string {
	return fmt.Sprintf("Rflush{}")
}
type twalk struct {
	fid fid
	newFID fid
	Names []string
}
func (t *twalk) decode(b *buffer) {
	t.fid = b.ReadFID()
	t.newFID = b.ReadFID()
	n := b.Read16()
	t.Names = t.Names[:0]
	for i := 0; i < int(n); i++ {
		t.Names = append(t.Names, b.ReadString())
	}
}
func (t *twalk) encode(b *buffer) {
	b.WriteFID(t.fid)
	b.WriteFID(t.newFID)
	b.Write16(uint16(len(t.Names)))
	for _, name := range t.Names {
		b.WriteString(name)
	}
}
func (*twalk) typ() msgType {
	return msgTwalk
}
func (t *twalk) String() string {
	return fmt.Sprintf("Twalk{FID: %d, newFID: %d, Names: %v}", t.fid, t.newFID, t.Names)
}
type rwalk struct {
	QIDs []QID
}
func (r *rwalk) decode(b *buffer) {
	n := b.Read16()
	r.QIDs = r.QIDs[:0]
	for i := 0; i < int(n); i++ {
		var q QID
		q.decode(b)
		r.QIDs = append(r.QIDs, q)
	}
}
func (r *rwalk) encode(b *buffer) {
	b.Write16(uint16(len(r.QIDs)))
	for _, q := range r.QIDs {
		q.encode(b)
	}
}
func (*rwalk) typ() msgType {
	return msgRwalk
}
func (r *rwalk) String() string {
	return fmt.Sprintf("Rwalk{QIDs: %v}", r.QIDs)
}
type tclunk struct {
	fid fid
}
func (t *tclunk) decode(b *buffer) {
	t.fid = b.ReadFID()
}
func (t *tclunk) encode(b *buffer) {
	b.WriteFID(t.fid)
}
func (*tclunk) typ() msgType {
	return msgTclunk
}
func (t *tclunk) String() string {
	return fmt.Sprintf("Tclunk{FID: %d}", t.fid)
}
type rclunk struct{}
func (*rclunk) decode(b *buffer) {
}
func (*rclunk) encode(b *buffer) {
}
func (*rclunk) typ() msgType {
	return msgRclunk
}
func (r *rclunk) String() string {
	return fmt.Sprintf("Rclunk{}")
}
type tremove struct {
	fid fid
}
func (t *tremove) decode(b *buffer) {
	t.fid = b.ReadFID()
}
func (t *tremove) encode(b *buffer) {
	b.WriteFID(t.fid)
}
func (*tremove) typ() msgType {
	return msgTremove
}
func (t *tremove) String() string {
	return fmt.Sprintf("Tremove{FID: %d}", t.fid)
}
type rremove struct {
}
func (*rremove) decode(b *buffer) {
}
func (*rremove) encode(b *buffer) {
}
func (*rremove) typ() msgType {
	return msgRremove
}
func (r *rremove) String() string {
	return fmt.Sprintf("Rremove{}")
}
type rlerror struct {
	Error uint32
}
func (r *rlerror) decode(b *buffer) {
	r.Error = b.Read32()
}
func (r *rlerror) encode(b *buffer) {
	b.Write32(r.Error)
}
func (*rlerror) typ() msgType {
	return msgRlerror
}
func (r *rlerror) String() string {
	return fmt.Sprintf("Rlerror{Error: %d}", r.Error)
}
type tauth struct {
	Authenticationfid fid
	UserName string
	AttachName string
	UID UID
}