func PackTwrite(fc *Fcall, fid uint32, offset uint64, count uint32, data []byte) error {
	c := len(data)
	size := 4 + 8 + 4 + c  
	p, err := packCommon(fc, size, Twrite)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Offset = offset
	fc.Count = count
	p = pint32(fid, p)
	p = pint64(offset, p)
	p = pint32(count, p)
	fc.Data = p
	copy(fc.Data, data)
	return nil
}
Create a Twrite message in the specified Fcall.
package p
func PackTversion(fc *Fcall, msize uint32, version string) error {
	size := 4 + 2 + len(version)  
	p, err := packCommon(fc, size, Tversion)
	if err != nil {
		return err
	}
	fc.Msize = msize
	fc.Version = version
	p = pint32(msize, p)
	p = pstr(version, p)
	return nil
}
func PackTauth(fc *Fcall, fid uint32, uname string, aname string, unamenum uint32, dotu bool) error {
	size := 4 + 2 + 2 + len(uname) + len(aname)  
	if dotu {
		size += 4  
	}
	p, err := packCommon(fc, size, Tauth)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Uname = uname
	fc.Aname = aname
	p = pint32(fid, p)
	p = pstr(uname, p)
	p = pstr(aname, p)
	if dotu {
		fc.Unamenum = unamenum
		p = pint32(unamenum, p)
	}
	return nil
}
func PackTflush(fc *Fcall, oldtag uint16) error {
	p, err := packCommon(fc, 2, Tflush)
	if err != nil {
		return err
	}
	fc.Oldtag = oldtag
	p = pint16(oldtag, p)
	return nil
}
func PackTattach(fc *Fcall, fid uint32, afid uint32, uname string, aname string, unamenum uint32, dotu bool) error {
	size := 4 + 4 + 2 + len(uname) + 2 + len(aname)  
	if dotu {
		size += 4
	}
	p, err := packCommon(fc, size, Tattach)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Afid = afid
	fc.Uname = uname
	fc.Aname = aname
	p = pint32(fid, p)
	p = pint32(afid, p)
	p = pstr(uname, p)
	p = pstr(aname, p)
	if dotu {
		fc.Unamenum = unamenum
		p = pint32(unamenum, p)
	}
	return nil
}
func PackTwalk(fc *Fcall, fid uint32, newfid uint32, wnames []string) error {
	nwname := len(wnames)
	size := 4 + 4 + 2 + nwname*2  
	for i := 0; i < nwname; i++ {
		size += len(wnames[i])
	}
	p, err := packCommon(fc, size, Twalk)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Newfid = newfid
	p = pint32(fid, p)
	p = pint32(newfid, p)
	p = pint16(uint16(nwname), p)
	fc.Wname = make([]string, nwname)
	for i := 0; i < nwname; i++ {
		fc.Wname[i] = wnames[i]
		p = pstr(wnames[i], p)
	}
	return nil
}
func PackTopen(fc *Fcall, fid uint32, mode uint8) error {
	size := 4 + 1  
	p, err := packCommon(fc, size, Topen)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Mode = mode
	p = pint32(fid, p)
	p = pint8(mode, p)
	return nil
}
func PackTcreate(fc *Fcall, fid uint32, name string, perm uint32, mode uint8, ext string, dotu bool) error {
	size := 4 + 2 + len(name) + 4 + 1  
	if dotu {
		size += 2 + len(ext)
	}
	p, err := packCommon(fc, size, Tcreate)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Name = name
	fc.Perm = perm
	fc.Mode = mode
	p = pint32(fid, p)
	p = pstr(name, p)
	p = pint32(perm, p)
	p = pint8(mode, p)
	if dotu {
		fc.Ext = ext
		p = pstr(ext, p)
	}
	return nil
}
func PackTread(fc *Fcall, fid uint32, offset uint64, count uint32) error {
	size := 4 + 8 + 4  
	p, err := packCommon(fc, size, Tread)
	if err != nil {
		return err
	}
	fc.Fid = fid
	fc.Offset = offset
	fc.Count = count
	p = pint32(fid, p)
	p = pint64(offset, p)
	p = pint32(count, p)
	return nil
}