NTSTATUS status;
union smb_search_data data;
} levels[] = {
- {"FFIRST",
- RAW_SEARCH_FFIRST, RAW_SEARCH_DATA_SEARCH,
- offsetof(union smb_search_data, search.name),
- -1,
+ {
+ .name = "FFIRST",
+ .level = RAW_SEARCH_FFIRST,
+ .data_level = RAW_SEARCH_DATA_SEARCH,
+ .name_offset = offsetof(union smb_search_data,
+ search.name),
+ .resume_key_offset = -1,
},
- {"FUNIQUE",
- RAW_SEARCH_FUNIQUE, RAW_SEARCH_DATA_SEARCH,
- offsetof(union smb_search_data, search.name),
- -1,
+ {
+ .name = "FUNIQUE",
+ .level = RAW_SEARCH_FUNIQUE,
+ .data_level = RAW_SEARCH_DATA_SEARCH,
+ .name_offset = offsetof(union smb_search_data,
+ search.name),
+ .resume_key_offset = -1,
},
- {"SEARCH",
- RAW_SEARCH_SEARCH, RAW_SEARCH_DATA_SEARCH,
- offsetof(union smb_search_data, search.name),
- -1,
+ {
+ .name = "SEARCH",
+ .level = RAW_SEARCH_SEARCH,
+ .data_level = RAW_SEARCH_DATA_SEARCH,
+ .name_offset = offsetof(union smb_search_data,
+ search.name),
+ .resume_key_offset = -1,
},
- {"STANDARD",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_STANDARD,
- offsetof(union smb_search_data, standard.name.s),
- offsetof(union smb_search_data, standard.resume_key),
+ {
+ .name = "STANDARD",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_STANDARD,
+ .name_offset = offsetof(union smb_search_data,
+ standard.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ standard.resume_key),
},
- {"EA_SIZE",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_EA_SIZE,
- offsetof(union smb_search_data, ea_size.name.s),
- offsetof(union smb_search_data, ea_size.resume_key),
+ {
+ .name = "EA_SIZE",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_EA_SIZE,
+ .name_offset = offsetof(union smb_search_data,
+ ea_size.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ ea_size.resume_key),
},
- {"DIRECTORY_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_DIRECTORY_INFO,
- offsetof(union smb_search_data, directory_info.name.s),
- offsetof(union smb_search_data, directory_info.file_index),
+ {
+ .name = "DIRECTORY_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_DIRECTORY_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ directory_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ directory_info.file_index),
},
- {"FULL_DIRECTORY_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_FULL_DIRECTORY_INFO,
- offsetof(union smb_search_data, full_directory_info.name.s),
- offsetof(union smb_search_data, full_directory_info.file_index),
+ {
+ .name = "FULL_DIRECTORY_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_FULL_DIRECTORY_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ full_directory_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ full_directory_info.file_index),
},
- {"NAME_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_NAME_INFO,
- offsetof(union smb_search_data, name_info.name.s),
- offsetof(union smb_search_data, name_info.file_index),
+ {
+ .name = "NAME_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_NAME_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ name_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ name_info.file_index),
},
- {"BOTH_DIRECTORY_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO,
- offsetof(union smb_search_data, both_directory_info.name.s),
- offsetof(union smb_search_data, both_directory_info.file_index),
+ {
+ .name = "BOTH_DIRECTORY_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ both_directory_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ both_directory_info.file_index),
},
- {"ID_FULL_DIRECTORY_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO,
- offsetof(union smb_search_data, id_full_directory_info.name.s),
- offsetof(union smb_search_data, id_full_directory_info.file_index),
+ {
+ .name = "ID_FULL_DIRECTORY_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_ID_FULL_DIRECTORY_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ id_full_directory_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ id_full_directory_info.file_index),
},
- {"ID_BOTH_DIRECTORY_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO,
- offsetof(union smb_search_data, id_both_directory_info.name.s),
- offsetof(union smb_search_data, id_both_directory_info.file_index),
+ {
+ .name = "ID_BOTH_DIRECTORY_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_ID_BOTH_DIRECTORY_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ id_both_directory_info.name.s),
+ .resume_key_offset = offsetof(union smb_search_data,
+ id_both_directory_info.file_index),
+ },
+ {
+ .name = "UNIX_INFO",
+ .level = RAW_SEARCH_TRANS2,
+ .data_level = RAW_SEARCH_DATA_UNIX_INFO,
+ .name_offset = offsetof(union smb_search_data,
+ unix_info.name),
+ .resume_key_offset = offsetof(union smb_search_data,
+ unix_info.file_index),
+ .capability_mask = CAP_UNIX
},
- {"UNIX_INFO",
- RAW_SEARCH_TRANS2, RAW_SEARCH_DATA_UNIX_INFO,
- offsetof(union smb_search_data, unix_info.name),
- offsetof(union smb_search_data, unix_info.file_index),
- CAP_UNIX}
};