5ea8cd6fa697c34c187856604d785ee9a737e208
[platform/upstream/multipath-tools.git] / libmpathpersist / mpathpr.h
1 #ifndef MPATHPR_H
2 #define MPATHPR_H
3
4 #include "structs.h" /* FILE_NAME_SIZE */
5
6 struct prin_param {
7         char dev[FILE_NAME_SIZE];
8         int rq_servact;
9         struct prin_resp *resp;
10         int noisy;
11         int status;
12 };
13
14 struct prout_param {
15         char dev[FILE_NAME_SIZE];
16         int rq_servact;
17         int rq_scope;
18         unsigned int rq_type;
19         struct prout_param_descriptor  *paramp;
20         int noisy;
21         int status;
22 };
23
24 struct threadinfo {
25         int status;
26         pthread_t id;
27         struct prout_param param;
28 };
29
30 int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp * resp, int noisy);
31 int prout_do_scsi_ioctl( char * dev, int rq_servact, int rq_scope,
32                 unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy);
33 void * _mpath_pr_update (void *arg);
34 int mpath_send_prin_activepath (char * dev, int rq_servact, struct prin_resp * resp, int noisy);
35 int get_mpvec (vector curmp, vector pathvec, char * refwwid);
36 void * mpath_prout_pthread_fn(void *p);
37 void dumpHex(const char* , int len, int no_ascii);
38
39 int mpath_prout_reg(struct multipath *mpp,int rq_servact, int rq_scope,
40         unsigned int rq_type,  struct prout_param_descriptor * paramp, int noisy);
41 int mpath_prout_common(struct multipath *mpp,int rq_servact, int rq_scope,
42         unsigned int rq_type,  struct prout_param_descriptor * paramp, int noisy);
43 int mpath_prout_rel(struct multipath *mpp,int rq_servact, int rq_scope,
44         unsigned int rq_type,  struct prout_param_descriptor * paramp, int noisy);
45 int send_prout_activepath(char * dev, int rq_servact, int rq_scope,
46         unsigned int rq_type,   struct prout_param_descriptor * paramp, int noisy);
47
48 int update_prflag(char *mapname, int set);
49 int update_prkey_flags(char *mapname, uint64_t prkey, uint8_t sa_flags);
50 #define update_prkey(mapname, prkey) update_prkey_flags(mapname, prkey, 0)
51 void * mpath_alloc_prin_response(int prin_sa);
52 int update_map_pr(struct multipath *mpp);
53
54 #endif