blob: 35f11e0111cba86ba516393d7b853c7a7d2c8b6c [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _NFSD_CLD_H
8#define _NFSD_CLD_H
Christopher Ferris525ce912017-07-26 13:12:53 -07009#include <linux/types.h>
Christopher Ferris9584fa42019-12-09 15:36:13 -080010#define CLD_UPCALL_VERSION 2
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define NFS4_OPAQUE_LIMIT 1024
Christopher Ferris9584fa42019-12-09 15:36:13 -080012#ifndef SHA256_DIGEST_SIZE
13#define SHA256_DIGEST_SIZE 32
14#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070015enum cld_command {
Tao Baod7db5942015-01-28 10:07:51 -080016 Cld_Create,
17 Cld_Remove,
18 Cld_Check,
Tao Baod7db5942015-01-28 10:07:51 -080019 Cld_GraceDone,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070020 Cld_GraceStart,
Christopher Ferris9584fa42019-12-09 15:36:13 -080021 Cld_GetVersion,
Ben Cheng655a7c02013-10-16 16:09:24 -070022};
23struct cld_name {
Christopher Ferris525ce912017-07-26 13:12:53 -070024 __u16 cn_len;
Tao Baod7db5942015-01-28 10:07:51 -080025 unsigned char cn_id[NFS4_OPAQUE_LIMIT];
Ben Cheng655a7c02013-10-16 16:09:24 -070026} __attribute__((packed));
Christopher Ferris9584fa42019-12-09 15:36:13 -080027struct cld_princhash {
28 __u8 cp_len;
29 unsigned char cp_data[SHA256_DIGEST_SIZE];
30} __attribute__((packed));
31struct cld_clntinfo {
32 struct cld_name cc_name;
33 struct cld_princhash cc_princhash;
34} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070035struct cld_msg {
Christopher Ferris525ce912017-07-26 13:12:53 -070036 __u8 cm_vers;
37 __u8 cm_cmd;
38 __s16 cm_status;
39 __u32 cm_xid;
Tao Baod7db5942015-01-28 10:07:51 -080040 union {
Christopher Ferris525ce912017-07-26 13:12:53 -070041 __s64 cm_gracetime;
Tao Baod7db5942015-01-28 10:07:51 -080042 struct cld_name cm_name;
Christopher Ferris9584fa42019-12-09 15:36:13 -080043 __u8 cm_version;
Tao Baod7db5942015-01-28 10:07:51 -080044 } __attribute__((packed)) cm_u;
Ben Cheng655a7c02013-10-16 16:09:24 -070045} __attribute__((packed));
Christopher Ferris9584fa42019-12-09 15:36:13 -080046struct cld_msg_v2 {
47 __u8 cm_vers;
48 __u8 cm_cmd;
49 __s16 cm_status;
50 __u32 cm_xid;
51 union {
52 struct cld_name cm_name;
53 __u8 cm_version;
54 struct cld_clntinfo cm_clntinfo;
55 } __attribute__((packed)) cm_u;
56} __attribute__((packed));
57struct cld_msg_hdr {
58 __u8 cm_vers;
59 __u8 cm_cmd;
60 __s16 cm_status;
61 __u32 cm_xid;
62} __attribute__((packed));
Nick Kralevicha67e4de2013-01-14 11:28:26 -080063#endif