00001 #ifndef lnmstrdef_h 00002 #define lnmstrdef_h 00003 00004 /* Author: Roar Thronęs */ 00005 00006 #include<sysgen.h> 00007 #include<linux/linkage.h> 00008 00009 #define LNM_M_NO_DELETE 0x10 /* for use in lnmb. the rest is decl otherplace */ 00010 00011 #define LNMX_M_XEND 4 00012 00013 #define LNMTH_M_SHAREABLE 0x1 00014 #define LNMTH_M_DIRECTORY 0x2 00015 #define LNMTH_M_GROUP 0x4 00016 #define LNMTH_M_SYSTEM 0x8 00017 #define LNMTH_M_CLUSTERWIDE 0x10 00018 #define LNMTH_M_REMACTION 0x20 00019 #define LNMTH_K_LENGTH 40 00020 #define LNMTH_S_LNMTHDEF 40 00021 00022 #define LNMX_M_CONCEALED 0x1 00023 #define LNMX_M_TERMINAL 0x2 00024 #define LNMX_C_HSHFCN 0x80 00025 #define LNMX_C_BACKPTR 0x81 00026 #define LNMX_C_TABLE 0x82 00027 #define LNMX_C_IGNORED_INDEX 0x83 00028 #define LNMX_C_CW_LINKS 0x84 00029 #define LNMX_S_LNMXDEF 25 00030 00031 #ifndef USERLAND 00032 #define lnmmalloc(x) kmalloc(x,GFP_KERNEL); 00033 #define lnmfree kfree 00034 #undef lnmprintf 00035 #define lnmprintf printk 00036 #else 00037 #define lnmmalloc malloc 00038 #define lnmfree free 00039 #define lnmprintf printf 00040 #endif 00041 00042 struct _lnmth { 00043 unsigned long lnmth_l_flags; 00044 void * lnmth_l_hash; 00045 struct orb * lnmth_l_orb; 00046 struct _lnmb * lnmth_l_name; 00047 void * lnmth_l_parent; 00048 void * lnmth_l_child; 00049 void * lnmth_l_sibling; 00050 void * lnmth_l_qtable; 00051 unsigned long lnmth_l_byteslm; 00052 unsigned long lnmth_l_bytes; 00053 }; 00054 00055 struct _lnmc { 00056 struct _lnmc * lnmc_l_flink; 00057 struct _lnmc * lnmc_l_blink; 00058 unsigned short lnmc_w_size; 00059 unsigned char lnmc_b_type; 00060 unsigned char lnmc_b_mode; 00061 unsigned long lnmc_l_cacheindx; 00062 void * lnmc_l_tbladdr; 00063 unsigned long lnmc_l_procdirseq; 00064 unsigned long lnmc_l_sysdirseq; 00065 struct _lnmth * lnmc_l_entry[26]; /* unstandard */ 00066 }; 00067 00068 struct _lnmx { 00069 unsigned long lnmx_l_flags; 00070 unsigned long lnmx_l_index; 00071 unsigned long lnmx_l_hash; 00072 struct _lnmx *lnmx_l_next; 00073 unsigned int lnmx_l_pad; 00074 unsigned int lnmx_l_xlen; 00075 char lnmx_t_xlation[252]; 00076 }; 00077 00078 struct _lnmb { 00079 struct _lnmb * lnmb_l_flink; 00080 struct _lnmb * lnmb_l_blink; 00081 unsigned short lnmb_w_size; 00082 unsigned char lnmb_b_type; 00083 char empty; 00084 unsigned char lnmb_b_acmode; 00085 struct _lnmth * lnmb_l_table; 00086 struct _lnmx * lnmb_l_lnmx; 00087 00088 unsigned char lnmb_b_flags; /* lnmdef is supposed to go here */ 00089 unsigned char lnmb_b_count; 00090 unsigned char lnmb_t_name[254]; 00091 }; 00092 00093 struct lnmhshp { 00094 struct lnmhsh * lnmhsh_l_flink; 00095 struct lnmhsh * lnmhsh_l_blink; 00096 unsigned long lnmhsh_l_mask; 00097 unsigned long reserved; 00098 unsigned short lnmhsh_w_size; 00099 unsigned char lnmhsh_b_type; 00100 unsigned char reserved2; 00101 void * entry[2*LNMPHASHTBL]; 00102 }; 00103 00104 struct lnmhshs { 00105 struct lnmhsh * lnmhsh_l_flink; 00106 struct lnmhsh * lnmhsh_l_blink; 00107 unsigned long lnmhsh_l_mask; 00108 unsigned long reserved; 00109 unsigned short lnmhsh_w_size; 00110 unsigned char lnmhsh_b_type; 00111 unsigned char reserved2; 00112 void * entry[2*LNMSHASHTBL]; 00113 }; 00114 00115 struct _lnmhsh { 00116 unsigned int lnmhsh_l_mask; 00117 int lnmhsh_l_fill_1; 00118 unsigned short int lnmhsh_w_size; 00119 unsigned char lnmhsh_b_type; 00120 char lnmhsh_b_fill_2; 00121 }; 00122 00123 struct struct_nt { 00124 /* ???? */ 00125 struct _lnmb * lnmb; 00126 struct _lnmb * lnmb_cur; 00127 struct _lnmth * lnmth; 00128 char * lognam; 00129 unsigned long loglen; 00130 unsigned long hash; 00131 }; 00132 00133 struct struct_rt { 00134 int flags; 00135 int depth; 00136 int tries; 00137 int acmode; 00138 struct _lnmc * cache; 00139 char * context[10]; 00140 }; 00141 00142 struct struct_lnm_ret { 00143 struct _lnmth * mylnmth; 00144 struct _lnmb * mylnmb; 00145 }; 00146 00147 #endif 00148 00149 00150