linux/net/9p/protocol.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * 9P Protocol Support Code
 *
 *  Copyright (C) 2008 by Eric Van Hensbergen <[email protected]>
 *
 *  Base on code from Anthony Liguori <[email protected]>
 *  Copyright (C) 2008 by IBM, Corp.
 */

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/uio.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>
#include "protocol.h"

#include <trace/events/9p.h>

/* len[2] text[len] */
#define P9_STRLEN(s)

/**
 * p9_msg_buf_size - Returns a buffer size sufficiently large to hold the
 * intended 9p message.
 * @c: client
 * @type: message type
 * @fmt: format template for assembling request message
 * (see p9pdu_vwritef)
 * @ap: variable arguments to be fed to passed format template
 * (see p9pdu_vwritef)
 *
 * Note: Even for response types (P9_R*) the format template and variable
 * arguments must always be for the originating request type (P9_T*).
 */
size_t p9_msg_buf_size(struct p9_client *c, enum p9_msg_t type,
			const char *fmt, va_list ap)
{}

static int
p9pdu_writef(struct p9_fcall *pdu, int proto_version, const char *fmt, ...);

void p9stat_free(struct p9_wstat *stbuf)
{}
EXPORT_SYMBOL();

size_t pdu_read(struct p9_fcall *pdu, void *data, size_t size)
{}

static size_t pdu_write(struct p9_fcall *pdu, const void *data, size_t size)
{}

static size_t
pdu_write_u(struct p9_fcall *pdu, struct iov_iter *from, size_t size)
{}

/*	b - int8_t
 *	w - int16_t
 *	d - int32_t
 *	q - int64_t
 *	s - string
 *	u - numeric uid
 *	g - numeric gid
 *	S - stat
 *	Q - qid
 *	D - data blob (int32_t size followed by void *, results are not freed)
 *	T - array of strings (int16_t count, followed by strings)
 *	R - array of qids (int16_t count, followed by qids)
 *	A - stat for 9p2000.L (p9_stat_dotl)
 *	? - if optional = 1, continue parsing
 */

static int
p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,
	     va_list ap)
{}

int
p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt,
	va_list ap)
{}

int p9pdu_readf(struct p9_fcall *pdu, int proto_version, const char *fmt, ...)
{}

static int
p9pdu_writef(struct p9_fcall *pdu, int proto_version, const char *fmt, ...)
{}

int p9stat_read(struct p9_client *clnt, char *buf, int len, struct p9_wstat *st)
{}
EXPORT_SYMBOL();

int p9pdu_prepare(struct p9_fcall *pdu, int16_t tag, int8_t type)
{}

int p9pdu_finalize(struct p9_client *clnt, struct p9_fcall *pdu)
{}

void p9pdu_reset(struct p9_fcall *pdu)
{}

int p9dirent_read(struct p9_client *clnt, char *buf, int len,
		  struct p9_dirent *dirent)
{}
EXPORT_SYMBOL();