1 #ifndef _LINUX_NCP_H_ 2 #define _LINUX_NCP_H_ 3 4 #define NCP_OPEN 0x1111 5 #define NCP_CLOSE 0x5555 6 #define NCP_REQUEST 0x2222 7 #define NCP_REPLY 0x3333 8 9 struct ncp_request 10 { 11 unsigned short p_type __attribute__ ((packed)); 12 unsigned char seq __attribute__ ((packed)); 13 unsigned char c_low __attribute__ ((packed)); 14 unsigned char task __attribute__ ((packed)); 15 unsigned char c_high __attribute__ ((packed)); 16 unsigned char func __attribute__ ((packed)); 17 }; 18 19 struct ncp_request_sf 20 { 21 unsigned short p_type __attribute__ ((packed)); 22 unsigned char seq __attribute__ ((packed)); 23 unsigned char c_low __attribute__ ((packed)); 24 unsigned char task __attribute__ ((packed)); 25 unsigned char c_high __attribute__ ((packed)); 26 unsigned char func __attribute__ ((packed)); 27 unsigned short s_len __attribute__ ((packed)); 28 unsigned char s_func __attribute__ ((packed)); 29 }; 30 31 struct ncp_reply 32 { 33 unsigned short p_type __attribute__ ((packed)); 34 unsigned char seq __attribute__ ((packed)); 35 unsigned char c_low __attribute__ ((packed)); 36 unsigned char task __attribute__ ((packed)); 37 unsigned char c_high __attribute__ ((packed)); 38 unsigned char f_stat __attribute__ ((packed)); 39 unsigned char c_stat __attribute__ ((packed)); 40 }; 41 42 #define OTYPE_USER 0x0001 43 #define OTYPE_GROUP 0x0002 44 #define OTYPE_PQUEUE 0x0003 45 #define OTYPE_FSERVER 0x0004 46 #define OTYPE_JSERVER 0x0005 47 #define OTYPE_PSERVER 0x0007 48 #define OTYPE_UNKNOWN_1 0x002E 49 #define OTYPE_ADV_PSERVER 0x0047 50 #define OTYPE_AFSERVER 0x0107 51 #define OTYPE_UNKNOWN_2 0x0143 52 #define OTYPE_UNKNOWN_3 0x01F5 53 #define OTYPE_UNKNOWN_4 0x023F 54 55 #define LIMIT_OBJNAME 47 56 57 struct bind_obj 58 { 59 unsigned long id __attribute__ ((packed)); 60 unsigned short type __attribute__ ((packed)); 61 char name[LIMIT_OBJNAME+1] __attribute__ ((packed)); 62 }; 63 64 struct get_bind_obj 65 { 66 unsigned short type __attribute__ ((packed)); 67 unsigned char n_len __attribute__ ((packed)); 68 char name[0] __attribute__ ((packed)); 69 }; 70 71 struct scan_bind_obj 72 { 73 unsigned long id __attribute__ ((packed)); 74 unsigned short type __attribute__ ((packed)); 75 unsigned char n_len __attribute__ ((packed)); 76 char name[0] __attribute__ ((packed)); 77 }; 78 79 struct login_req 80 { 81 unsigned char password[8] __attribute__ ((packed)); 82 unsigned short type __attribute__ ((packed)); 83 unsigned char n_len __attribute__ ((packed)); 84 char name[0] __attribute__ ((packed)); 85 }; 86 87 struct ncp_time 88 { 89 unsigned char year __attribute__ ((packed)); 90 unsigned char month __attribute__ ((packed)); 91 unsigned char day __attribute__ ((packed)); 92 unsigned char hours __attribute__ ((packed)); 93 unsigned char mins __attribute__ ((packed)); 94 unsigned char secs __attribute__ ((packed)); 95 unsigned char c_secs __attribute__ ((packed)); 96 }; 97 98 struct login_info 99 { 100 unsigned long id __attribute__ ((packed)); 101 unsigned short un1 __attribute__ ((packed)); 102 char name[LIMIT_OBJNAME+1] __attribute__ ((packed)); 103 struct ncp_time time __attribute__ ((packed)); 104 }; 105 #endif 106