1 /* The following definitions come from libsmb/unexpected.c */
5 struct nb_packet_server
;
6 struct nb_packet_reader
;
8 NTSTATUS
nb_packet_server_create(TALLOC_CTX
*mem_ctx
,
9 struct tevent_context
*ev
,
11 struct nb_packet_server
**presult
);
12 void nb_packet_dispatch(struct nb_packet_server
*server
,
13 struct packet_struct
*p
);
14 struct tevent_req
*nb_packet_reader_send(TALLOC_CTX
*mem_ctx
,
15 struct tevent_context
*ev
,
16 enum packet_type type
,
18 const char *mailslot_name
);
19 NTSTATUS
nb_packet_reader_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
20 struct nb_packet_reader
**preader
);
21 struct tevent_req
*nb_packet_read_send(TALLOC_CTX
*mem_ctx
,
22 struct tevent_context
*ev
,
23 struct nb_packet_reader
*reader
);
24 NTSTATUS
nb_packet_read_recv(struct tevent_req
*req
,
25 struct packet_struct
**ppacket
);
27 /* The following definitions come from libsmb/nmblib.c */
29 void debug_nmb_packet(struct packet_struct
*p
);
30 void put_name(char *dest
, const char *name
, int pad
, unsigned int name_type
);
31 char *nmb_namestr(const struct nmb_name
*n
);
32 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
33 void free_packet(struct packet_struct
*packet
);
34 int packet_trn_id(struct packet_struct
*p
);
35 struct packet_struct
*parse_packet(char *buf
,int length
,
36 enum packet_type packet_type
,
39 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
40 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
41 bool nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
42 int build_packet(char *buf
, size_t buflen
, struct packet_struct
*p
);
43 bool send_packet(struct packet_struct
*p
);
44 bool match_mailslot_name(struct packet_struct
*p
, const char *mailslot_name
);
45 int matching_len_bits(unsigned char *p1
, unsigned char *p2
, size_t len
);
46 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
47 char *name_mangle(TALLOC_CTX
*mem_ctx
, const char *In
, char name_type
);
48 int name_extract(unsigned char *buf
,size_t buf_len
, unsigned int ofs
, fstring name
);
49 int name_len(unsigned char *s1
, size_t buf_len
);