source: svn/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/lockd/xdr.h @ 76

Last change on this file since 76 was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1/*
2 * linux/include/linux/lockd/xdr.h
3 *
4 * XDR types for the NLM protocol
5 *
6 * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
7 */
8
9#ifndef LOCKD_XDR_H
10#define LOCKD_XDR_H
11
12#include <asm/types.h>
13
14#include <linux/fs.h>
15#include <linux/nfs.h>
16
17#define NLM_MAXCOOKIELEN        32
18#define NLM_MAXSTRLEN           1024
19
20#define nlm_granted             __constant_htonl(NLM_LCK_GRANTED)
21#define nlm_lck_denied          __constant_htonl(NLM_LCK_DENIED)
22#define nlm_lck_denied_nolocks  __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
23#define nlm_lck_blocked         __constant_htonl(NLM_LCK_BLOCKED)
24#define nlm_lck_denied_grace_period     __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
25
26/* Lock info passed via NLM */
27struct nlm_lock {
28        char *                  caller;
29        int                     len;    /* length of "caller" */
30        struct nfs_fh           fh;
31        struct xdr_netobj       oh;
32        struct file_lock        fl;
33};
34
35/*
36 *      NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
37 *      FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
38 *      32 bytes.
39 */
40 
41struct nlm_cookie
42{
43        unsigned char data[NLM_MAXCOOKIELEN];
44        unsigned int len;
45};
46
47/*
48 * Generic lockd arguments for all but sm_notify
49 */
50struct nlm_args {
51        struct nlm_cookie       cookie;
52        struct nlm_lock         lock;
53        __u32                   block;
54        __u32                   reclaim;
55        __u32                   state;
56        __u32                   monitor;
57        __u32                   fsm_access;
58        __u32                   fsm_mode;
59};
60
61typedef struct nlm_args nlm_args;
62
63/*
64 * Generic lockd result
65 */
66struct nlm_res {
67        struct nlm_cookie       cookie;
68        __u32                   status;
69        struct nlm_lock         lock;
70};
71
72/*
73 * statd callback when client has rebooted
74 */
75struct nlm_reboot {
76        char *          mon;
77        int             len;
78        __u32           state;
79        __u32           addr;
80        __u32           vers;
81        __u32           proto;
82};
83
84/*
85 * Contents of statd callback when monitored host rebooted
86 */
87#define NLMSVC_XDRSIZE          sizeof(struct nlm_args)
88
89int     nlmsvc_decode_testargs(struct svc_rqst *, __u32 *, struct nlm_args *);
90int     nlmsvc_encode_testres(struct svc_rqst *, __u32 *, struct nlm_res *);
91int     nlmsvc_decode_lockargs(struct svc_rqst *, __u32 *, struct nlm_args *);
92int     nlmsvc_decode_cancargs(struct svc_rqst *, __u32 *, struct nlm_args *);
93int     nlmsvc_decode_unlockargs(struct svc_rqst *, __u32 *, struct nlm_args *);
94int     nlmsvc_encode_res(struct svc_rqst *, __u32 *, struct nlm_res *);
95int     nlmsvc_decode_res(struct svc_rqst *, __u32 *, struct nlm_res *);
96int     nlmsvc_encode_void(struct svc_rqst *, __u32 *, void *);
97int     nlmsvc_decode_void(struct svc_rqst *, __u32 *, void *);
98int     nlmsvc_decode_shareargs(struct svc_rqst *, __u32 *, struct nlm_args *);
99int     nlmsvc_encode_shareres(struct svc_rqst *, __u32 *, struct nlm_res *);
100int     nlmsvc_decode_notify(struct svc_rqst *, __u32 *, struct nlm_args *);
101int     nlmsvc_decode_reboot(struct svc_rqst *, __u32 *, struct nlm_reboot *);
102/*
103int     nlmclt_encode_testargs(struct rpc_rqst *, __u32 *, struct nlm_args *);
104int     nlmclt_encode_lockargs(struct rpc_rqst *, __u32 *, struct nlm_args *);
105int     nlmclt_encode_cancargs(struct rpc_rqst *, __u32 *, struct nlm_args *);
106int     nlmclt_encode_unlockargs(struct rpc_rqst *, __u32 *, struct nlm_args *);
107 */
108
109#endif /* LOCKD_XDR_H */
Note: See TracBrowser for help on using the repository browser.