Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
client.h File Reference

Go to the source code of this file.

Data Structures

struct  p9_req_t
 
struct  p9_client
 
struct  p9_fid
 
struct  p9_dirent
 

Macros

#define P9_ROW_MAXTAG   255
 

Enumerations

enum  p9_proto_versions { p9_proto_legacy, p9_proto_2000u, p9_proto_2000L }
 
enum  p9_trans_status { Connected, BeginDisconnect, Disconnected, Hung }
 
enum  p9_req_status_t {
  REQ_STATUS_IDLE, REQ_STATUS_ALLOC, REQ_STATUS_UNSENT, REQ_STATUS_SENT,
  REQ_STATUS_FLSH, REQ_STATUS_RCVD, REQ_STATUS_FLSHD, REQ_STATUS_ERROR
}
 

Functions

int p9_client_statfs (struct p9_fid *fid, struct p9_rstatfs *sb)
 
int p9_client_rename (struct p9_fid *fid, struct p9_fid *newdirfid, const char *name)
 
int p9_client_renameat (struct p9_fid *olddirfid, const char *old_name, struct p9_fid *newdirfid, const char *new_name)
 
struct p9_clientp9_client_create (const char *dev_name, char *options)
 
void p9_client_destroy (struct p9_client *clnt)
 
void p9_client_disconnect (struct p9_client *clnt)
 
void p9_client_begin_disconnect (struct p9_client *clnt)
 
struct p9_fidp9_client_attach (struct p9_client *clnt, struct p9_fid *afid, char *uname, u32 n_uname, char *aname)
 
struct p9_fidp9_client_walk (struct p9_fid *oldfid, uint16_t nwname, char **wnames, int clone)
 
int p9_client_open (struct p9_fid *fid, int mode)
 
int p9_client_fcreate (struct p9_fid *fid, char *name, u32 perm, int mode, char *extension)
 
int p9_client_link (struct p9_fid *fid, struct p9_fid *oldfid, char *newname)
 
int p9_client_symlink (struct p9_fid *fid, char *name, char *symname, gid_t gid, struct p9_qid *qid)
 
int p9_client_create_dotl (struct p9_fid *ofid, char *name, u32 flags, u32 mode, gid_t gid, struct p9_qid *qid)
 
int p9_client_clunk (struct p9_fid *fid)
 
int p9_client_fsync (struct p9_fid *fid, int datasync)
 
int p9_client_remove (struct p9_fid *fid)
 
int p9_client_unlinkat (struct p9_fid *dfid, const char *name, int flags)
 
int p9_client_read (struct p9_fid *fid, char *data, char __user *udata, u64 offset, u32 count)
 
int p9_client_write (struct p9_fid *fid, char *data, const char __user *udata, u64 offset, u32 count)
 
int p9_client_readdir (struct p9_fid *fid, char *data, u32 count, u64 offset)
 
int p9dirent_read (struct p9_client *clnt, char *buf, int len, struct p9_dirent *dirent)
 
struct p9_wstatp9_client_stat (struct p9_fid *fid)
 
int p9_client_wstat (struct p9_fid *fid, struct p9_wstat *wst)
 
int p9_client_setattr (struct p9_fid *fid, struct p9_iattr_dotl *attr)
 
struct p9_stat_dotlp9_client_getattr_dotl (struct p9_fid *fid, u64 request_mask)
 
int p9_client_mknod_dotl (struct p9_fid *oldfid, char *name, int mode, dev_t rdev, gid_t gid, struct p9_qid *)
 
int p9_client_mkdir_dotl (struct p9_fid *fid, char *name, int mode, gid_t gid, struct p9_qid *)
 
int p9_client_lock_dotl (struct p9_fid *fid, struct p9_flock *flock, u8 *status)
 
int p9_client_getlock_dotl (struct p9_fid *fid, struct p9_getlock *fl)
 
struct p9_req_tp9_tag_lookup (struct p9_client *, u16)
 
void p9_client_cb (struct p9_client *c, struct p9_req_t *req)
 
int p9_parse_header (struct p9_fcall *, int32_t *, int8_t *, int16_t *, int)
 
int p9stat_read (struct p9_client *, char *, int, struct p9_wstat *)
 
void p9stat_free (struct p9_wstat *)
 
int p9_is_proto_dotu (struct p9_client *clnt)
 
int p9_is_proto_dotl (struct p9_client *clnt)
 
struct p9_fidp9_client_xattrwalk (struct p9_fid *, const char *, u64 *)
 
int p9_client_xattrcreate (struct p9_fid *, const char *, u64, int)
 
int p9_client_readlink (struct p9_fid *fid, char **target)
 

Macro Definition Documentation

#define P9_ROW_MAXTAG   255

Definition at line 30 of file client.h.

Enumeration Type Documentation

enum p9_proto_versions - 9P protocol versions : 9P Legacy mode, pre-9P2000.u : 9P2000.u extension : 9P2000.L extension

Enumerator:
p9_proto_legacy 
p9_proto_2000u 
p9_proto_2000L 

Definition at line 38 of file client.h.

enum p9_req_status_t - status of a request : request slot unused : request has been allocated but not sent : request waiting to be sent : request sent to server : a flush has been sent for this request : response received from server : request has been flushed : request encountered an error on the client side

The state is used to mark a request slot as unused but use is actually tracked by the idpool structure which handles tag id allocation.

Enumerator:
REQ_STATUS_IDLE 
REQ_STATUS_ALLOC 
REQ_STATUS_UNSENT 
REQ_STATUS_SENT 
REQ_STATUS_FLSH 
REQ_STATUS_RCVD 
REQ_STATUS_FLSHD 
REQ_STATUS_ERROR 

Definition at line 79 of file client.h.

enum p9_trans_status - different states of underlying transports : transport is connected and healthy : transport has been disconnected : transport is connected by wedged

This enumeration details the various states a transport instatiation can be in.

Enumerator:
Connected 
BeginDisconnect 
Disconnected 
Hung 

Definition at line 55 of file client.h.

Function Documentation

struct p9_fid* p9_client_attach ( struct p9_client clnt,
struct p9_fid afid,
char uname,
u32  n_uname,
char aname 
)
read

Definition at line 1102 of file client.c.

void p9_client_begin_disconnect ( struct p9_client clnt)

Definition at line 1095 of file client.c.

void p9_client_cb ( struct p9_client c,
struct p9_req_t req 
)

p9_client_cb - call back from transport to client c: client state req: request received

Definition at line 410 of file client.c.

int p9_client_clunk ( struct p9_fid fid)

Definition at line 1440 of file client.c.

struct p9_client* p9_client_create ( const char dev_name,
char options 
)
read

Definition at line 994 of file client.c.

int p9_client_create_dotl ( struct p9_fid ofid,
char name,
u32  flags,
u32  mode,
gid_t  gid,
struct p9_qid qid 
)

Definition at line 1272 of file client.c.

void p9_client_destroy ( struct p9_client clnt)

Definition at line 1063 of file client.c.

void p9_client_disconnect ( struct p9_client clnt)

Definition at line 1088 of file client.c.

int p9_client_fcreate ( struct p9_fid fid,
char name,
u32  perm,
int  mode,
char extension 
)

Definition at line 1316 of file client.c.

int p9_client_fsync ( struct p9_fid fid,
int  datasync 
)

Definition at line 1414 of file client.c.

struct p9_stat_dotl* p9_client_getattr_dotl ( struct p9_fid fid,
u64  request_mask 
)
read

Definition at line 1724 of file client.c.

int p9_client_getlock_dotl ( struct p9_fid fid,
struct p9_getlock fl 
)

Definition at line 2203 of file client.c.

int p9_client_link ( struct p9_fid fid,
struct p9_fid oldfid,
char newname 
)

Definition at line 1395 of file client.c.

int p9_client_lock_dotl ( struct p9_fid fid,
struct p9_flock flock,
u8 status 
)

Definition at line 2170 of file client.c.

int p9_client_mkdir_dotl ( struct p9_fid fid,
char name,
int  mode,
gid_t  gid,
struct p9_qid  
)

Definition at line 2139 of file client.c.

int p9_client_mknod_dotl ( struct p9_fid oldfid,
char name,
int  mode,
dev_t  rdev,
gid_t  gid,
struct p9_qid  
)

Definition at line 2108 of file client.c.

int p9_client_open ( struct p9_fid fid,
int  mode 
)

Definition at line 1227 of file client.c.

int p9_client_read ( struct p9_fid fid,
char data,
char __user udata,
u64  offset,
u32  count 
)

Definition at line 1536 of file client.c.

int p9_client_readdir ( struct p9_fid fid,
char data,
u32  count,
u64  offset 
)

Definition at line 2049 of file client.c.

int p9_client_readlink ( struct p9_fid fid,
char **  target 
)

Definition at line 2237 of file client.c.

int p9_client_remove ( struct p9_fid fid)

Definition at line 1484 of file client.c.

int p9_client_rename ( struct p9_fid fid,
struct p9_fid newdirfid,
const char name 
)

Definition at line 1916 of file client.c.

int p9_client_renameat ( struct p9_fid olddirfid,
const char old_name,
struct p9_fid newdirfid,
const char new_name 
)

Definition at line 1944 of file client.c.

int p9_client_setattr ( struct p9_fid fid,
struct p9_iattr_dotl attr 
)

Definition at line 1847 of file client.c.

struct p9_wstat* p9_client_stat ( struct p9_fid fid)
read

Definition at line 1675 of file client.c.

int p9_client_statfs ( struct p9_fid fid,
struct p9_rstatfs sb 
)

Definition at line 1877 of file client.c.

int p9_client_symlink ( struct p9_fid fid,
char name,
char symname,
gid_t  gid,
struct p9_qid qid 
)

Definition at line 1361 of file client.c.

int p9_client_unlinkat ( struct p9_fid dfid,
const char name,
int  flags 
)

Definition at line 1512 of file client.c.

struct p9_fid* p9_client_walk ( struct p9_fid oldfid,
uint16_t  nwname,
char **  wnames,
int  clone 
)
read

Definition at line 1149 of file client.c.

int p9_client_write ( struct p9_fid fid,
char data,
const char __user udata,
u64  offset,
u32  count 
)

Definition at line 1613 of file client.c.

int p9_client_wstat ( struct p9_fid fid,
struct p9_wstat wst 
)

Definition at line 1812 of file client.c.

int p9_client_xattrcreate ( struct p9_fid ,
const char ,
u64  ,
int   
)

Definition at line 2024 of file client.c.

struct p9_fid* p9_client_xattrwalk ( struct p9_fid ,
const char ,
u64  
)
read

Definition at line 1977 of file client.c.

int p9_is_proto_dotl ( struct p9_client clnt)
inline

Definition at line 67 of file client.c.

int p9_is_proto_dotu ( struct p9_client clnt)
inline

Definition at line 73 of file client.c.

int p9_parse_header ( struct p9_fcall pdu,
int32_t size,
int8_t type,
int16_t tag,
int  rewind 
)

p9_parse_header - parse header arguments out of a packet : packet to parse : size of packet : type of request : tag of packet : set if we need to rewind offset afterwards

Definition at line 428 of file client.c.

struct p9_req_t* p9_tag_lookup ( struct p9_client c,
u16  tag 
)
read

p9_tag_lookup - lookup a request by tag : client session to lookup tag within : numeric id for transaction

Definition at line 301 of file client.c.

int p9dirent_read ( struct p9_client clnt,
char buf,
int  len,
struct p9_dirent dirent 
)

Definition at line 573 of file protocol.c.

void p9stat_free ( struct p9_wstat )

Definition at line 45 of file protocol.c.

int p9stat_read ( struct p9_client ,
char ,
int  ,
struct p9_wstat  
)

Definition at line 525 of file protocol.c.