Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

malformed packet in Netware

4 views
Skip to first unread message

hari

unread,
Aug 1, 2011, 8:41:50 AM8/1/11
to


Hi all,


I want to seach the file in netware server, if the file exist with
same name, then I will create with different filename.I am using
Search for file or subdirectory Function 89, Subfunction 3.

Packet formation:
source code between asterisk are commented(2 byte pattern, following
is wild card). In wireshark capture it shows MALFORMED PACKET, server
supports OS2 namespace.

1.Does server will not reply if packet is malformed(based on any
security level set on server)


long
ncp_search_for_file_or_subdir3(struct ncp_conn *conn,
int search_attributes,
u_int32_t RIM,
struct ncp_search_seq *seq,
struct nw_info_struct *target)
{
long result;

if (!seq) {
return ERR_NULL_POINTER;
}
ncp_init_request(conn);
ncp_add_byte(conn, 3); /* subfunction */
ncp_add_byte(conn, seq->name_space);
ncp_add_byte(conn, 0); /* data stream (???) */
ncp_add_word_lh(conn, search_attributes); /* Search attribs */
ncp_add_dword_lh(conn, RIM); /* return info mask */
ncp_add_mem(conn, &(seq->s), 9);
ncp_add_byte(conn,1);
ncp_add_byte(conn,0);
/
********************************************************************************************************/
/* ncp_add_byte(conn, 2) 2 byte pattern */
/* ncp_add_byte(conn, 0xff); following is a wildcard */
/* ncp_add_byte(conn, '*'); */
/
********************************************************************************************************/
/* fn: 89 , subfn: 3 */
if ((result = ncp_request(conn, 89)) != 0)
{
ncp_unlock_conn(conn);
return result;
}
memcpy(&(seq->s), ncp_reply_data(conn, 0), sizeof(seq->s));
ncp_extract_file_info2(ncp_reply_data(conn, 10), target);

ncp_unlock_conn(conn);
return 0;
}


0 new messages