summaryrefslogtreecommitdiffstats
path: root/tapset/nfs_mnt_rq.stp
blob: 4f638a8ef72668553112d8ec6f2e43849159abfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
%{
#include <linux/socket.h>
#include <net/sock.h>
#include <net/inet_sock.h>
#include <linux/nfs.h>

struct nfs_mount_request {
    struct sockaddr     *sap;
    size_t          salen;
    char            *hostname;
    char            *dirpath;
    u32         version;
    unsigned short      protocol;
    struct nfs_fh       *fh;
    int         noresvport;
};

%}
function mnt_req:string(_req:long)
%{
	struct nfs_mount_request *req = 
			(struct nfs_mount_request *)(long) kread(&(THIS->_req));
	
	snprintf(THIS->__retvalue, MAXSTRINGLEN, 
		"server: %s export: %s vers: %d proto: %d", 
			req->hostname, req->dirpath, req->version, req->protocol);

	CATCH_DEREF_FAULT();
%}