130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#ifndef _LINUX_VIRTIO_9P_H
230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define _LINUX_VIRTIO_9P_H
330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* This header is BSD licensed so anyone can use the definitions to implement
430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * compatible drivers/servers.
530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *
630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * Redistribution and use in source and binary forms, with or without
730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * modification, are permitted provided that the following conditions
830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * are met:
930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 1. Redistributions of source code must retain the above copyright
1030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *    notice, this list of conditions and the following disclaimer.
1130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 2. Redistributions in binary form must reproduce the above copyright
1230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *    notice, this list of conditions and the following disclaimer in the
1330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *    documentation and/or other materials provided with the distribution.
1430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * 3. Neither the name of IBM nor the names of its contributors
1530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *    may be used to endorse or promote products derived from this software
1630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng *    without specific prior written permission.
1730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
1830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * ARE DISCLAIMED.  IN NO EVENT SHALL IBM OR CONTRIBUTORS BE LIABLE
2130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2730692c65c4174412c90e79489e98ab85c1a7412fBen Cheng * SUCH DAMAGE. */
2830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#include <linux/types.h>
2930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#include <linux/virtio_ids.h>
3030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#include <linux/virtio_config.h>
3130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* The feature bitmap for virtio 9P */
3330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng/* The mount point is specified in a config variable */
3530692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#define VIRTIO_9P_MOUNT_TAG 0
3630692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
3730692c65c4174412c90e79489e98ab85c1a7412fBen Chengstruct virtio_9p_config {
3830692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	/* length of the tag name */
3930692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__u16 tag_len;
4030692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	/* non-NULL terminated tag name */
4130692c65c4174412c90e79489e98ab85c1a7412fBen Cheng	__u8 tag[0];
4230692c65c4174412c90e79489e98ab85c1a7412fBen Cheng} __attribute__((packed));
4330692c65c4174412c90e79489e98ab85c1a7412fBen Cheng
4430692c65c4174412c90e79489e98ab85c1a7412fBen Cheng#endif /* _LINUX_VIRTIO_9P_H */
45