summaryrefslogtreecommitdiffstats
path: root/tapset/nfs4_callback.stp
blob: 351f0f26a1bc2c0d81a478980669218d6034214f (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
31
32
33
34
35
%{
#include <linux/socket.h>
#include <net/sock.h>
#include <net/inet_sock.h>

#include <linux/sunrpc/svc.h>

#include <linux/nfs4.h>
#include <linux/nfsd/nfsfh.h>
#include <linux/nfsd/state.h>
%}

function nfs4_callback:string(_stp:long)
%{
	struct nfs4_stateid *stp = (struct nfs4_stateid *) 
		(long) kread(&(THIS->_stp));
	struct nfs4_stateowner *sop = (struct nfs4_stateowner *) 
		(long) kread(&stp->st_stateowner);
	struct nfs4_client *so_client = (struct nfs4_client *)
		(long)kread(&sop->so_client);
	struct nfs4_callback *cb = (struct nfs4_callback *)
		&so_client->cl_callback;

	char buf[MAXSTRINGLEN];
	int cc=0;

	snprintf(buf+cc, MAXSTRINGLEN, "cb: cb_set %d so_confirmed %d", 
		cb->cb_set.counter, sop->so_confirmed);
			
	cc = strlen(buf);
	snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); 

	CATCH_DEREF_FAULT();

%}