1 /* 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 */ 7 #ifndef _NFSD_CLD_H 8 #define _NFSD_CLD_H 9 #include <linux/types.h> 10 #define CLD_UPCALL_VERSION 2 11 #define NFS4_OPAQUE_LIMIT 1024 12 #ifndef SHA256_DIGEST_SIZE 13 #define SHA256_DIGEST_SIZE 32 14 #endif 15 enum cld_command { 16 Cld_Create, 17 Cld_Remove, 18 Cld_Check, 19 Cld_GraceDone, 20 Cld_GraceStart, 21 Cld_GetVersion, 22 }; 23 struct cld_name { 24 __u16 cn_len; 25 unsigned char cn_id[NFS4_OPAQUE_LIMIT]; 26 } __attribute__((packed)); 27 struct cld_princhash { 28 __u8 cp_len; 29 unsigned char cp_data[SHA256_DIGEST_SIZE]; 30 } __attribute__((packed)); 31 struct cld_clntinfo { 32 struct cld_name cc_name; 33 struct cld_princhash cc_princhash; 34 } __attribute__((packed)); 35 struct cld_msg { 36 __u8 cm_vers; 37 __u8 cm_cmd; 38 __s16 cm_status; 39 __u32 cm_xid; 40 union { 41 __s64 cm_gracetime; 42 struct cld_name cm_name; 43 __u8 cm_version; 44 } __attribute__((packed)) cm_u; 45 } __attribute__((packed)); 46 struct 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)); 57 struct cld_msg_hdr { 58 __u8 cm_vers; 59 __u8 cm_cmd; 60 __s16 cm_status; 61 __u32 cm_xid; 62 } __attribute__((packed)); 63 #endif 64