3 * Unix SMB/Netbios implementation.
5 * RPC Pipe client / server routines
6 * Copyright (C) Andrew Tridgell 1992-1999,
7 * Copyright (C) Luke Kenneth Casson Leighton 1996-1999,
8 * Copyright (C) Paul Ashton 1997-1999.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 extern int DEBUGLEVEL;
31 /*******************************************************************
32 makes a SH_INFO_1_STR structure
33 ********************************************************************/
34 BOOL make_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark)
36 if (sh1 == NULL) return False;
38 DEBUG(5,("make_srv_share_info1_str\n"));
40 make_unistr2(&(sh1->uni_netname), net_name, strlen(net_name)+1);
41 make_unistr2(&(sh1->uni_remark ), remark , strlen(remark )+1);
46 /*******************************************************************
47 reads or writes a structure.
48 ********************************************************************/
49 static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
51 if (sh1 == NULL) return False;
53 prs_debug(ps, depth, desc, "srv_io_share_info1_str");
58 smb_io_unistr2("", &(sh1->uni_netname), True, ps, depth);
60 smb_io_unistr2("", &(sh1->uni_remark ), True, ps, depth);
67 /*******************************************************************
68 makes a SH_INFO_1 structure
69 ********************************************************************/
70 BOOL make_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark)
72 if (sh1 == NULL) return False;
74 DEBUG(5,("make_srv_share_info1: %s %8x %s\n", net_name, type, remark));
76 sh1->ptr_netname = net_name != NULL ? 1 : 0;
78 sh1->ptr_remark = remark != NULL ? 1 : 0;
83 /*******************************************************************
84 reads or writes a structure.
85 ********************************************************************/
86 static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
88 if (sh1 == NULL) return False;
90 prs_debug(ps, depth, desc, "srv_io_share_info1");
95 prs_uint32("ptr_netname", ps, depth, &(sh1->ptr_netname));
96 prs_uint32("type ", ps, depth, &(sh1->type ));
97 prs_uint32("ptr_remark ", ps, depth, &(sh1->ptr_remark));
102 /*******************************************************************
103 reads or writes a structure.
104 ********************************************************************/
105 static BOOL srv_io_srv_share_info_1(char *desc, SRV_SHARE_INFO_1 *ctr, prs_struct *ps, int depth)
107 if (ctr == NULL) return False;
109 prs_debug(ps, depth, desc, "srv_io_share_1_ctr");
114 prs_uint32("num_entries_read", ps, depth, &(ctr->num_entries_read));
115 prs_uint32("ptr_share_info", ps, depth, &(ctr->ptr_share_info));
117 if (ctr->ptr_share_info != 0)
120 int num_entries = ctr->num_entries_read;
121 if (num_entries > MAX_SHARE_ENTRIES)
123 num_entries = MAX_SHARE_ENTRIES; /* report this! */
126 prs_uint32("num_entries_read2", ps, depth, &(ctr->num_entries_read2));
128 SMB_ASSERT_ARRAY(ctr->info_1, num_entries);
130 for (i = 0; i < num_entries; i++)
133 srv_io_share_info1("", &(ctr->info_1[i]), ps, depth);
136 for (i = 0; i < num_entries; i++)
139 srv_io_share_info1_str("", &(ctr->info_1_str[i]), ps, depth);
148 /*******************************************************************
149 makes a SH_INFO_2_STR structure
150 ********************************************************************/
151 BOOL make_srv_share_info2_str(SH_INFO_2_STR *sh2,
152 char *net_name, char *remark,
153 char *path, char *passwd)
155 if (sh2 == NULL) return False;
157 DEBUG(5,("make_srv_share_info2_str\n"));
159 make_unistr2(&(sh2->uni_netname), net_name, strlen(net_name)+1);
160 make_unistr2(&(sh2->uni_remark ), remark , strlen(remark )+1);
161 make_unistr2(&(sh2->uni_path ), path , strlen(path )+1);
162 make_unistr2(&(sh2->uni_passwd ), passwd , strlen(passwd )+1);
167 /*******************************************************************
168 reads or writes a structure.
169 ********************************************************************/
170 static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2_STR *ss2, SH_INFO_2 *sh2, prs_struct *ps, int depth)
172 if (ss2 == NULL) return False;
174 prs_debug(ps, depth, desc, "srv_io_share_info2_str");
179 smb_io_unistr2("", &(ss2->uni_netname), sh2->ptr_netname, ps, depth);
181 smb_io_unistr2("", &(ss2->uni_remark ), sh2->ptr_remark , ps, depth);
183 smb_io_unistr2("", &(ss2->uni_path ), sh2->ptr_path , ps, depth);
185 smb_io_unistr2("", &(ss2->uni_passwd ), sh2->ptr_passwd , ps, depth);
191 /*******************************************************************
192 makes a SH_INFO_2 structure
193 ********************************************************************/
194 BOOL make_srv_share_info2(SH_INFO_2 *sh2,
195 char *net_name, uint32 type, char *remark,
196 uint32 perms, uint32 max_uses, uint32 num_uses,
197 char *path, char *passwd)
199 if (sh2 == NULL) return False;
201 DEBUG(5,("make_srv_share_info2: %s %8x %s\n", net_name, type, remark));
203 sh2->ptr_netname = net_name != NULL ? 1 : 0;
205 sh2->ptr_remark = remark != NULL ? 1 : 0;
207 sh2->max_uses = max_uses;
208 sh2->num_uses = num_uses;
210 sh2->ptr_path = path != NULL ? 1 : 0;
211 sh2->ptr_passwd = passwd != NULL ? 1 : 0;
216 /*******************************************************************
217 reads or writes a structure.
218 ********************************************************************/
219 static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
221 if (sh2 == NULL) return False;
223 prs_debug(ps, depth, desc, "srv_io_share_info2");
228 prs_uint32("ptr_netname", ps, depth, &(sh2->ptr_netname));
229 prs_uint32("type ", ps, depth, &(sh2->type ));
230 prs_uint32("ptr_remark ", ps, depth, &(sh2->ptr_remark ));
231 prs_uint32("perms ", ps, depth, &(sh2->perms ));
232 prs_uint32("max_uses ", ps, depth, &(sh2->max_uses ));
233 prs_uint32("num_uses ", ps, depth, &(sh2->num_uses ));
234 prs_uint32("ptr_path ", ps, depth, &(sh2->ptr_path ));
235 prs_uint32("ptr_passwd ", ps, depth, &(sh2->ptr_passwd ));
240 /*******************************************************************
241 reads or writes a structure.
242 ********************************************************************/
243 static BOOL srv_io_srv_share_info_2(char *desc, SRV_SHARE_INFO_2 *ctr, prs_struct *ps, int depth)
245 if (ctr == NULL) return False;
247 prs_debug(ps, depth, desc, "srv_io_share_2_ctr");
252 prs_uint32("num_entries_read", ps, depth, &(ctr->num_entries_read));
253 prs_uint32("ptr_share_info", ps, depth, &(ctr->ptr_share_info));
255 if (ctr->ptr_share_info != 0)
258 int num_entries = ctr->num_entries_read;
259 if (num_entries > MAX_SHARE_ENTRIES)
261 num_entries = MAX_SHARE_ENTRIES; /* report this! */
264 prs_uint32("num_entries_read2", ps, depth, &(ctr->num_entries_read2));
266 SMB_ASSERT_ARRAY(ctr->info_2, num_entries);
268 for (i = 0; i < num_entries; i++)
271 if (!srv_io_share_info2("", &(ctr->info_2[i]), ps, depth)) return False;
274 for (i = 0; i < num_entries; i++)
277 if (!srv_io_share_info2_str("", &(ctr->info_2_str[i]), &(ctr->info_2[i]), ps, depth)) return False;
286 /*******************************************************************
287 reads or writes a structure.
288 ********************************************************************/
289 static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
291 if (ctr == NULL) return False;
293 prs_debug(ps, depth, desc, "srv_io_srv_share_ctr");
298 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
299 prs_uint32("ptr_share_ctr", ps, depth, &(ctr->ptr_share_ctr));
301 if (ctr->ptr_share_ctr != 0)
303 switch (ctr->switch_value)
307 srv_io_srv_share_info_2("", &(ctr->share.info2), ps, depth);
312 srv_io_srv_share_info_1("", &(ctr->share.info1), ps, depth);
317 DEBUG(5,("%s no share info at switch_value %d\n",
318 tab_depth(depth), ctr->switch_value));
327 /*******************************************************************
328 reads or writes a structure.
329 ********************************************************************/
330 BOOL make_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
332 uint32 share_level, SRV_SHARE_INFO_CTR *ctr,
333 uint32 preferred_len,
336 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
340 DEBUG(5,("make_q_net_share_enum\n"));
342 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
344 q_n->share_level = share_level;
345 q_n->preferred_len = preferred_len;
347 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
352 /*******************************************************************
353 reads or writes a structure.
354 ********************************************************************/
355 BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
357 if (q_n == NULL) return False;
359 prs_debug(ps, depth, desc, "srv_io_q_net_share_enum");
364 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
365 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
369 prs_uint32("share_level", ps, depth, &(q_n->share_level ));
371 if (q_n->share_level != -1)
373 srv_io_srv_share_ctr("share_ctr", q_n->ctr, ps, depth);
376 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
378 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
383 /*******************************************************************
384 reads or writes a structure.
385 ********************************************************************/
386 BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
388 if (r_n == NULL) return False;
390 prs_debug(ps, depth, desc, "srv_io_r_net_share_enum");
395 prs_uint32("share_level", ps, depth, &(r_n->share_level));
397 if (r_n->share_level != 0)
399 srv_io_srv_share_ctr("share_ctr", r_n->ctr, ps, depth);
402 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
403 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
404 prs_uint32("status ", ps, depth, &(r_n->status));
409 /*******************************************************************
410 makes a SESS_INFO_0_STR structure
411 ********************************************************************/
412 BOOL make_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name)
414 if (ss0 == NULL) return False;
416 DEBUG(5,("make_srv_sess_info0_str\n"));
418 make_unistr2(&(ss0->uni_name), name, strlen(name)+1);
423 /*******************************************************************
424 reads or writes a structure.
425 ********************************************************************/
426 static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
428 if (ss0 == NULL) return False;
430 prs_debug(ps, depth, desc, "srv_io_sess_info0_str");
435 smb_io_unistr2("", &(ss0->uni_name), True, ps, depth);
440 /*******************************************************************
441 makes a SESS_INFO_0 structure
442 ********************************************************************/
443 BOOL make_srv_sess_info0(SESS_INFO_0 *ss0, char *name)
445 if (ss0 == NULL) return False;
447 DEBUG(5,("make_srv_sess_info0: %s\n", name));
449 ss0->ptr_name = name != NULL ? 1 : 0;
454 /*******************************************************************
455 reads or writes a structure.
456 ********************************************************************/
457 static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
459 if (ss0 == NULL) return False;
461 prs_debug(ps, depth, desc, "srv_io_sess_info0");
466 prs_uint32("ptr_name", ps, depth, &(ss0->ptr_name));
471 /*******************************************************************
472 reads or writes a structure.
473 ********************************************************************/
474 static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
476 if (ss0 == NULL) return False;
478 prs_debug(ps, depth, desc, "srv_io_srv_sess_info_0");
483 prs_uint32("num_entries_read", ps, depth, &(ss0->num_entries_read));
484 prs_uint32("ptr_sess_info", ps, depth, &(ss0->ptr_sess_info));
486 if (ss0->ptr_sess_info != 0)
489 int num_entries = ss0->num_entries_read;
490 if (num_entries > MAX_SESS_ENTRIES)
492 num_entries = MAX_SESS_ENTRIES; /* report this! */
495 prs_uint32("num_entries_read2", ps, depth, &(ss0->num_entries_read2));
497 SMB_ASSERT_ARRAY(ss0->info_0, num_entries);
499 for (i = 0; i < num_entries; i++)
502 srv_io_sess_info0("", &(ss0->info_0[i]), ps, depth);
505 for (i = 0; i < num_entries; i++)
508 srv_io_sess_info0_str("", &(ss0->info_0_str[i]), ps, depth);
517 /*******************************************************************
518 makes a SESS_INFO_1_STR structure
519 ********************************************************************/
520 BOOL make_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
522 if (ss1 == NULL) return False;
524 DEBUG(5,("make_srv_sess_info1_str\n"));
526 make_unistr2(&(ss1->uni_name), name, strlen(name)+1);
527 make_unistr2(&(ss1->uni_user), name, strlen(user)+1);
532 /*******************************************************************
533 reads or writes a structure.
534 ********************************************************************/
535 static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
537 if (ss1 == NULL) return False;
539 prs_debug(ps, depth, desc, "srv_io_sess_info1_str");
544 smb_io_unistr2("", &(ss1->uni_name), True, ps, depth);
545 smb_io_unistr2("", &(ss1->uni_user), True, ps, depth);
550 /*******************************************************************
551 makes a SESS_INFO_1 structure
552 ********************************************************************/
553 BOOL make_srv_sess_info1(SESS_INFO_1 *ss1,
554 char *name, char *user,
555 uint32 num_opens, uint32 open_time, uint32 idle_time,
558 if (ss1 == NULL) return False;
560 DEBUG(5,("make_srv_sess_info1: %s\n", name));
562 ss1->ptr_name = name != NULL ? 1 : 0;
563 ss1->ptr_user = user != NULL ? 1 : 0;
565 ss1->num_opens = num_opens;
566 ss1->open_time = open_time;
567 ss1->idle_time = idle_time;
568 ss1->user_flags = user_flags;
573 /*******************************************************************
574 reads or writes a structure.
575 ********************************************************************/
576 static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
578 if (ss1 == NULL) return False;
580 prs_debug(ps, depth, desc, "srv_io_sess_info1");
585 prs_uint32("ptr_name ", ps, depth, &(ss1->ptr_name ));
586 prs_uint32("ptr_user ", ps, depth, &(ss1->ptr_user ));
588 prs_uint32("num_opens ", ps, depth, &(ss1->num_opens ));
589 prs_uint32("open_time ", ps, depth, &(ss1->open_time ));
590 prs_uint32("idle_time ", ps, depth, &(ss1->idle_time ));
591 prs_uint32("user_flags", ps, depth, &(ss1->user_flags));
596 /*******************************************************************
597 reads or writes a structure.
598 ********************************************************************/
599 static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
601 if (ss1 == NULL) return False;
603 prs_debug(ps, depth, desc, "srv_io_srv_sess_info_1");
608 prs_uint32("num_entries_read", ps, depth, &(ss1->num_entries_read));
609 prs_uint32("ptr_sess_info", ps, depth, &(ss1->ptr_sess_info));
611 if (ss1->ptr_sess_info != 0)
614 int num_entries = ss1->num_entries_read;
615 if (num_entries > MAX_SESS_ENTRIES)
617 num_entries = MAX_SESS_ENTRIES; /* report this! */
620 prs_uint32("num_entries_read2", ps, depth, &(ss1->num_entries_read2));
622 SMB_ASSERT_ARRAY(ss1->info_1, num_entries);
624 for (i = 0; i < num_entries; i++)
627 srv_io_sess_info1("", &(ss1->info_1[i]), ps, depth);
630 for (i = 0; i < num_entries; i++)
633 srv_io_sess_info1_str("", &(ss1->info_1_str[i]), ps, depth);
642 /*******************************************************************
643 reads or writes a structure.
644 ********************************************************************/
645 static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR *ctr, prs_struct *ps, int depth)
647 if (ctr == NULL) return False;
649 prs_debug(ps, depth, desc, "srv_io_srv_sess_ctr");
654 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
655 prs_uint32("ptr_sess_ctr", ps, depth, &(ctr->ptr_sess_ctr));
657 if (ctr->ptr_sess_ctr != 0)
659 switch (ctr->switch_value)
663 srv_io_srv_sess_info_0("", &(ctr->sess.info0), ps, depth);
668 srv_io_srv_sess_info_1("", &(ctr->sess.info1), ps, depth);
673 DEBUG(5,("%s no session info at switch_value %d\n",
674 tab_depth(depth), ctr->switch_value));
683 /*******************************************************************
684 reads or writes a structure.
685 ********************************************************************/
686 BOOL make_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
687 char *srv_name, char *qual_name,
689 uint32 sess_level, SRV_SESS_INFO_CTR *ctr,
690 uint32 preferred_len,
693 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
697 DEBUG(5,("make_q_net_sess_enum\n"));
699 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
700 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
701 make_buf_unistr2(&(q_n->uni_user_name), &(q_n->ptr_user_name), user_name);
703 q_n->sess_level = sess_level;
704 q_n->preferred_len = preferred_len;
706 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
711 /*******************************************************************
712 reads or writes a structure.
713 ********************************************************************/
714 BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth)
716 if (q_n == NULL) return False;
718 prs_debug(ps, depth, desc, "srv_io_q_net_sess_enum");
723 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
724 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
728 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
729 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
732 prs_uint32("ptr_user_name", ps, depth, &(q_n->ptr_user_name));
733 smb_io_unistr2("", &(q_n->uni_user_name), q_n->ptr_user_name, ps, depth);
736 prs_uint32("sess_level", ps, depth, &(q_n->sess_level ));
738 if (q_n->sess_level != -1)
740 srv_io_srv_sess_ctr("sess_ctr", q_n->ctr, ps, depth);
743 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
745 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
750 /*******************************************************************
751 reads or writes a structure.
752 ********************************************************************/
753 BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
755 if (r_n == NULL) return False;
757 prs_debug(ps, depth, desc, "srv_io_r_net_sess_enum");
762 prs_uint32("sess_level", ps, depth, &(r_n->sess_level));
764 if (r_n->sess_level != -1)
766 srv_io_srv_sess_ctr("sess_ctr", r_n->ctr, ps, depth);
769 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
770 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
771 prs_uint32("status ", ps, depth, &(r_n->status));
776 /*******************************************************************
777 makes a CONN_INFO_0 structure
778 ********************************************************************/
779 BOOL make_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id)
781 if (ss0 == NULL) return False;
783 DEBUG(5,("make_srv_conn_info0\n"));
790 /*******************************************************************
791 reads or writes a structure.
792 ********************************************************************/
793 static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
795 if (ss0 == NULL) return False;
797 prs_debug(ps, depth, desc, "srv_io_conn_info0");
802 prs_uint32("id", ps, depth, &(ss0->id));
807 /*******************************************************************
808 reads or writes a structure.
809 ********************************************************************/
810 static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
812 if (ss0 == NULL) return False;
814 prs_debug(ps, depth, desc, "srv_io_srv_conn_info_0");
819 prs_uint32("num_entries_read", ps, depth, &(ss0->num_entries_read));
820 prs_uint32("ptr_conn_info", ps, depth, &(ss0->ptr_conn_info));
822 if (ss0->ptr_conn_info != 0)
825 int num_entries = ss0->num_entries_read;
826 if (num_entries > MAX_CONN_ENTRIES)
828 num_entries = MAX_CONN_ENTRIES; /* report this! */
831 prs_uint32("num_entries_read2", ps, depth, &(ss0->num_entries_read2));
833 for (i = 0; i < num_entries; i++)
836 srv_io_conn_info0("", &(ss0->info_0[i]), ps, depth);
845 /*******************************************************************
846 makes a CONN_INFO_1_STR structure
847 ********************************************************************/
848 BOOL make_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_name)
850 if (ss1 == NULL) return False;
852 DEBUG(5,("make_srv_conn_info1_str\n"));
854 make_unistr2(&(ss1->uni_usr_name), usr_name, strlen(usr_name)+1);
855 make_unistr2(&(ss1->uni_net_name), net_name, strlen(net_name)+1);
860 /*******************************************************************
861 reads or writes a structure.
862 ********************************************************************/
863 static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
865 if (ss1 == NULL) return False;
867 prs_debug(ps, depth, desc, "srv_io_conn_info1_str");
872 smb_io_unistr2("", &(ss1->uni_usr_name), True, ps, depth);
873 smb_io_unistr2("", &(ss1->uni_net_name), True, ps, depth);
878 /*******************************************************************
879 makes a CONN_INFO_1 structure
880 ********************************************************************/
881 BOOL make_srv_conn_info1(CONN_INFO_1 *ss1,
882 uint32 id, uint32 type,
883 uint32 num_opens, uint32 num_users, uint32 open_time,
884 char *usr_name, char *net_name)
886 if (ss1 == NULL) return False;
888 DEBUG(5,("make_srv_conn_info1: %s %s\n", usr_name, net_name));
892 ss1->num_opens = num_opens ;
893 ss1->num_users = num_users;
894 ss1->open_time = open_time;
896 ss1->ptr_usr_name = usr_name != NULL ? 1 : 0;
897 ss1->ptr_net_name = net_name != NULL ? 1 : 0;
902 /*******************************************************************
903 reads or writes a structure.
904 ********************************************************************/
905 static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
907 if (ss1 == NULL) return False;
909 prs_debug(ps, depth, desc, "srv_io_conn_info1");
914 prs_uint32("id ", ps, depth, &(ss1->id ));
915 prs_uint32("type ", ps, depth, &(ss1->type ));
916 prs_uint32("num_opens ", ps, depth, &(ss1->num_opens ));
917 prs_uint32("num_users ", ps, depth, &(ss1->num_users ));
918 prs_uint32("open_time ", ps, depth, &(ss1->open_time ));
920 prs_uint32("ptr_usr_name", ps, depth, &(ss1->ptr_usr_name));
921 prs_uint32("ptr_net_name", ps, depth, &(ss1->ptr_net_name));
926 /*******************************************************************
927 reads or writes a structure.
928 ********************************************************************/
929 static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
931 if (ss1 == NULL) return False;
933 prs_debug(ps, depth, desc, "srv_io_srv_conn_info_1");
938 prs_uint32("num_entries_read", ps, depth, &(ss1->num_entries_read));
939 prs_uint32("ptr_conn_info", ps, depth, &(ss1->ptr_conn_info));
941 if (ss1->ptr_conn_info != 0)
944 int num_entries = ss1->num_entries_read;
945 if (num_entries > MAX_CONN_ENTRIES)
947 num_entries = MAX_CONN_ENTRIES; /* report this! */
950 prs_uint32("num_entries_read2", ps, depth, &(ss1->num_entries_read2));
952 for (i = 0; i < num_entries; i++)
955 srv_io_conn_info1("", &(ss1->info_1[i]), ps, depth);
958 for (i = 0; i < num_entries; i++)
961 srv_io_conn_info1_str("", &(ss1->info_1_str[i]), ps, depth);
970 /*******************************************************************
971 reads or writes a structure.
972 ********************************************************************/
973 static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR *ctr, prs_struct *ps, int depth)
975 if (ctr == NULL) return False;
977 prs_debug(ps, depth, desc, "srv_io_srv_conn_ctr");
982 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
983 prs_uint32("ptr_conn_ctr", ps, depth, &(ctr->ptr_conn_ctr));
985 if (ctr->ptr_conn_ctr != 0)
987 switch (ctr->switch_value)
991 srv_io_srv_conn_info_0("", &(ctr->conn.info0), ps, depth);
996 srv_io_srv_conn_info_1("", &(ctr->conn.info1), ps, depth);
1001 DEBUG(5,("%s no connection info at switch_value %d\n",
1002 tab_depth(depth), ctr->switch_value));
1011 /*******************************************************************
1012 reads or writes a structure.
1013 ********************************************************************/
1014 BOOL make_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
1015 char *srv_name, char *qual_name,
1016 uint32 conn_level, SRV_CONN_INFO_CTR *ctr,
1017 uint32 preferred_len,
1020 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
1024 DEBUG(5,("make_q_net_conn_enum\n"));
1026 make_buf_unistr2(&(q_n->uni_srv_name ), &(q_n->ptr_srv_name ), srv_name );
1027 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
1029 q_n->conn_level = conn_level;
1030 q_n->preferred_len = preferred_len;
1032 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
1037 /*******************************************************************
1038 reads or writes a structure.
1039 ********************************************************************/
1040 BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
1042 if (q_n == NULL) return False;
1044 prs_debug(ps, depth, desc, "srv_io_q_net_conn_enum");
1049 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1050 smb_io_unistr2("", &(q_n->uni_srv_name), q_n->ptr_srv_name, ps, depth);
1054 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
1055 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
1059 prs_uint32("conn_level", ps, depth, &(q_n->conn_level ));
1061 if (q_n->conn_level != -1)
1063 srv_io_srv_conn_ctr("conn_ctr", q_n->ctr, ps, depth);
1066 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
1068 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
1073 /*******************************************************************
1074 reads or writes a structure.
1075 ********************************************************************/
1076 BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
1078 if (r_n == NULL) return False;
1080 prs_debug(ps, depth, desc, "srv_io_r_net_conn_enum");
1085 prs_uint32("conn_level", ps, depth, &(r_n->conn_level));
1087 if (r_n->conn_level != -1)
1089 srv_io_srv_conn_ctr("conn_ctr", r_n->ctr, ps, depth);
1092 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
1093 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
1094 prs_uint32("status ", ps, depth, &(r_n->status));
1099 /*******************************************************************
1100 makes a FILE_INFO_3_STR structure
1101 ********************************************************************/
1102 BOOL make_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_name)
1104 if (fi3 == NULL) return False;
1106 DEBUG(5,("make_srv_file_info3_str\n"));
1108 make_unistr2(&(fi3->uni_path_name), path_name, strlen(path_name)+1);
1109 make_unistr2(&(fi3->uni_user_name), user_name, strlen(user_name)+1);
1114 /*******************************************************************
1115 reads or writes a structure.
1116 ********************************************************************/
1117 static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
1119 if (sh1 == NULL) return False;
1121 prs_debug(ps, depth, desc, "srv_io_file_info3_str");
1126 smb_io_unistr2("", &(sh1->uni_path_name), True, ps, depth);
1127 smb_io_unistr2("", &(sh1->uni_user_name), True, ps, depth);
1132 /*******************************************************************
1133 makes a FILE_INFO_3 structure
1134 ********************************************************************/
1135 BOOL make_srv_file_info3(FILE_INFO_3 *fl3,
1136 uint32 id, uint32 perms, uint32 num_locks,
1137 char *path_name, char *user_name)
1139 if (fl3 == NULL) return False;
1141 DEBUG(5,("make_srv_file_info3: %s %s\n", path_name, user_name));
1145 fl3->num_locks = num_locks;
1147 fl3->ptr_path_name = path_name != NULL ? 1 : 0;
1148 fl3->ptr_user_name = user_name != NULL ? 1 : 0;
1153 /*******************************************************************
1154 reads or writes a structure.
1155 ********************************************************************/
1156 static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
1158 if (fl3 == NULL) return False;
1160 prs_debug(ps, depth, desc, "srv_io_file_info3");
1165 prs_uint32("id ", ps, depth, &(fl3->id ));
1166 prs_uint32("perms ", ps, depth, &(fl3->perms ));
1167 prs_uint32("num_locks ", ps, depth, &(fl3->num_locks ));
1168 prs_uint32("ptr_path_name", ps, depth, &(fl3->ptr_path_name));
1169 prs_uint32("ptr_user_name", ps, depth, &(fl3->ptr_user_name));
1174 /*******************************************************************
1175 reads or writes a structure.
1176 ********************************************************************/
1177 static BOOL srv_io_srv_file_info_3(char *desc, SRV_FILE_INFO_3 *fl3, prs_struct *ps, int depth)
1179 if (fl3 == NULL) return False;
1181 prs_debug(ps, depth, desc, "srv_io_file_3_fl3");
1186 prs_uint32("num_entries_read", ps, depth, &(fl3->num_entries_read));
1187 prs_uint32("ptr_file_fl3", ps, depth, &(fl3->ptr_file_info));
1188 if (fl3->ptr_file_info != 0)
1191 int num_entries = fl3->num_entries_read;
1192 if (num_entries > MAX_FILE_ENTRIES)
1194 num_entries = MAX_FILE_ENTRIES; /* report this! */
1197 prs_uint32("num_entries_read2", ps, depth, &(fl3->num_entries_read2));
1199 for (i = 0; i < num_entries; i++)
1202 srv_io_file_info3("", &(fl3->info_3[i]), ps, depth);
1205 for (i = 0; i < num_entries; i++)
1208 srv_io_file_info3_str("", &(fl3->info_3_str[i]), ps, depth);
1217 /*******************************************************************
1218 reads or writes a structure.
1219 ********************************************************************/
1220 static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
1222 if (ctr == NULL) return False;
1224 prs_debug(ps, depth, desc, "srv_io_srv_file_ctr");
1229 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
1230 prs_uint32("ptr_file_ctr", ps, depth, &(ctr->ptr_file_ctr));
1232 if (ctr->ptr_file_ctr != 0)
1234 switch (ctr->switch_value)
1238 srv_io_srv_file_info_3("", &(ctr->file.info3), ps, depth);
1243 DEBUG(5,("%s no file info at switch_value %d\n",
1244 tab_depth(depth), ctr->switch_value));
1253 /*******************************************************************
1254 reads or writes a structure.
1255 ********************************************************************/
1256 BOOL make_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n,
1257 char *srv_name, char *qual_name, uint32 file_id,
1258 uint32 file_level, SRV_FILE_INFO_CTR *ctr,
1259 uint32 preferred_len,
1262 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
1266 DEBUG(5,("make_q_net_file_enum\n"));
1268 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
1269 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
1271 q_n->file_id = file_id;
1272 q_n->file_level = file_level;
1273 q_n->preferred_len = preferred_len;
1275 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
1280 /*******************************************************************
1281 reads or writes a structure.
1282 ********************************************************************/
1283 BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth)
1285 if (q_n == NULL) return False;
1287 prs_debug(ps, depth, desc, "srv_io_q_net_file_enum");
1292 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
1293 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1297 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
1298 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
1302 prs_uint32("file_id ", ps, depth, &(q_n->file_id ));
1303 prs_uint32("file_level", ps, depth, &(q_n->file_level));
1305 if (q_n->file_level != -1)
1307 srv_io_srv_file_ctr("file_ctr", q_n->ctr, ps, depth);
1310 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
1312 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
1317 /*******************************************************************
1318 reads or writes a structure.
1319 ********************************************************************/
1320 BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
1322 if (r_n == NULL) return False;
1324 prs_debug(ps, depth, desc, "srv_io_r_net_file_enum");
1329 prs_uint32("file_level", ps, depth, &(r_n->file_level));
1331 if (r_n->file_level != 0)
1333 srv_io_srv_file_ctr("file_ctr", r_n->ctr, ps, depth);
1336 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
1337 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
1338 prs_uint32("status ", ps, depth, &(r_n->status));
1343 /*******************************************************************
1344 makes a SRV_INFO_101 structure.
1345 ********************************************************************/
1346 BOOL make_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, char *name,
1347 uint32 ver_major, uint32 ver_minor,
1348 uint32 srv_type, char *comment)
1350 if (sv101 == NULL) return False;
1352 DEBUG(5,("make_srv_info_101\n"));
1354 sv101->platform_id = platform_id;
1355 make_buf_unistr2(&(sv101->uni_name ), &(sv101->ptr_name ) , name );
1356 sv101->ver_major = ver_major;
1357 sv101->ver_minor = ver_minor;
1358 sv101->srv_type = srv_type;
1359 make_buf_unistr2(&(sv101->uni_comment ), &(sv101->ptr_comment) , comment );
1365 /*******************************************************************
1366 reads or writes a SRV_INFO_101 structure.
1367 ********************************************************************/
1368 static BOOL srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
1370 if (sv101 == NULL) return False;
1372 prs_debug(ps, depth, desc, "srv_io_info_101");
1377 prs_uint32("platform_id ", ps, depth, &(sv101->platform_id ));
1378 prs_uint32("ptr_name ", ps, depth, &(sv101->ptr_name ));
1379 prs_uint32("ver_major ", ps, depth, &(sv101->ver_major ));
1380 prs_uint32("ver_minor ", ps, depth, &(sv101->ver_minor ));
1381 prs_uint32("srv_type ", ps, depth, &(sv101->srv_type ));
1382 prs_uint32("ptr_comment ", ps, depth, &(sv101->ptr_comment ));
1386 smb_io_unistr2("uni_name ", &(sv101->uni_name ), True, ps, depth);
1387 smb_io_unistr2("uni_comment ", &(sv101->uni_comment ), True, ps, depth);
1392 /*******************************************************************
1393 makes a SRV_INFO_102 structure.
1394 ********************************************************************/
1395 BOOL make_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, char *name,
1396 char *comment, uint32 ver_major, uint32 ver_minor,
1397 uint32 srv_type, uint32 users, uint32 disc, uint32 hidden,
1398 uint32 announce, uint32 ann_delta, uint32 licenses,
1401 if (sv102 == NULL) return False;
1403 DEBUG(5,("make_srv_info_102\n"));
1405 sv102->platform_id = platform_id;
1406 make_buf_unistr2(&(sv102->uni_name ), &(sv102->ptr_name ), name );
1407 sv102->ver_major = ver_major;
1408 sv102->ver_minor = ver_minor;
1409 sv102->srv_type = srv_type;
1410 make_buf_unistr2(&(sv102->uni_comment ), &(sv102->ptr_comment ), comment );
1412 /* same as 101 up to here */
1414 sv102->users = users;
1416 sv102->hidden = hidden;
1417 sv102->announce = announce;
1418 sv102->ann_delta =ann_delta;
1419 sv102->licenses = licenses;
1420 make_buf_unistr2(&(sv102->uni_usr_path), &(sv102->ptr_usr_path), usr_path);
1426 /*******************************************************************
1427 reads or writes a SRV_INFO_102 structure.
1428 ********************************************************************/
1429 static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
1431 if (sv102 == NULL) return False;
1433 prs_debug(ps, depth, desc, "srv_io_info102");
1438 prs_uint32("platform_id ", ps, depth, &(sv102->platform_id ));
1439 prs_uint32("ptr_name ", ps, depth, &(sv102->ptr_name ));
1440 prs_uint32("ver_major ", ps, depth, &(sv102->ver_major ));
1441 prs_uint32("ver_minor ", ps, depth, &(sv102->ver_minor ));
1442 prs_uint32("srv_type ", ps, depth, &(sv102->srv_type ));
1443 prs_uint32("ptr_comment ", ps, depth, &(sv102->ptr_comment ));
1445 /* same as 101 up to here */
1447 prs_uint32("users ", ps, depth, &(sv102->users ));
1448 prs_uint32("disc ", ps, depth, &(sv102->disc ));
1449 prs_uint32("hidden ", ps, depth, &(sv102->hidden ));
1450 prs_uint32("announce ", ps, depth, &(sv102->announce ));
1451 prs_uint32("ann_delta ", ps, depth, &(sv102->ann_delta ));
1452 prs_uint32("licenses ", ps, depth, &(sv102->licenses ));
1453 prs_uint32("ptr_usr_path", ps, depth, &(sv102->ptr_usr_path));
1455 smb_io_unistr2("uni_name ", &(sv102->uni_name ), True, ps, depth);
1457 smb_io_unistr2("uni_comment ", &(sv102->uni_comment ), True, ps, depth);
1459 smb_io_unistr2("uni_usr_path", &(sv102->uni_usr_path), True, ps, depth);
1464 /*******************************************************************
1465 reads or writes a SRV_INFO_102 structure.
1466 ********************************************************************/
1467 static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
1469 if (ctr == NULL) return False;
1471 prs_debug(ps, depth, desc, "srv_io_info_ctr");
1476 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
1477 prs_uint32("ptr_srv_ctr ", ps, depth, &(ctr->ptr_srv_ctr ));
1479 if (ctr->ptr_srv_ctr != 0 && ctr->switch_value != 0 && ctr != NULL)
1481 switch (ctr->switch_value)
1485 srv_io_info_101("sv101", &(ctr->srv.sv101), ps, depth);
1490 srv_io_info_102("sv102", &(ctr->srv.sv102), ps, depth);
1495 DEBUG(5,("%s no server info at switch_value %d\n",
1496 tab_depth(depth), ctr->switch_value));
1506 /*******************************************************************
1507 makes a SRV_Q_NET_SRV_GET_INFO structure.
1508 ********************************************************************/
1509 BOOL make_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
1510 char *server_name, uint32 switch_value)
1512 if (srv == NULL) return False;
1514 DEBUG(5,("make_srv_q_net_srv_get_info\n"));
1516 make_buf_unistr2(&(srv->uni_srv_name), &(srv->ptr_srv_name), server_name);
1518 srv->switch_value = switch_value;
1523 /*******************************************************************
1524 reads or writes a structure.
1525 ********************************************************************/
1526 BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
1528 if (q_n == NULL) return False;
1530 prs_debug(ps, depth, desc, "srv_io_q_net_srv_get_info");
1535 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1536 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1540 prs_uint32("switch_value ", ps, depth, &(q_n->switch_value));
1545 /*******************************************************************
1546 makes a SRV_R_NET_SRV_GET_INFO structure.
1547 ********************************************************************/
1548 BOOL make_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
1549 uint32 switch_value, SRV_INFO_CTR *ctr, uint32 status)
1551 if (srv == NULL) return False;
1553 DEBUG(5,("make_srv_r_net_srv_get_info\n"));
1559 srv->ctr->switch_value = switch_value;
1560 srv->ctr->ptr_srv_ctr = 1;
1564 srv->ctr->switch_value = 0;
1565 srv->ctr->ptr_srv_ctr = 0;
1568 srv->status = status;
1573 /*******************************************************************
1574 reads or writes a structure.
1575 ********************************************************************/
1576 BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
1578 if (r_n == NULL) return False;
1580 prs_debug(ps, depth, desc, "srv_io_r_net_srv_get_info");
1585 srv_io_info_ctr("ctr", r_n->ctr, ps, depth);
1587 prs_uint32("status ", ps, depth, &(r_n->status ));
1592 /*******************************************************************
1593 makes a SRV_Q_NET_REMOTE_TOD structure.
1594 ********************************************************************/
1595 BOOL make_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_t, char *server_name)
1597 if (q_t == NULL) return False;
1599 DEBUG(5,("make_srv_q_net_remote_tod\n"));
1601 make_buf_unistr2(&(q_t->uni_srv_name), &(q_t->ptr_srv_name), server_name);
1606 /*******************************************************************
1607 reads or writes a structure.
1608 ********************************************************************/
1609 BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
1611 if (q_n == NULL) return False;
1613 prs_debug(ps, depth, desc, "srv_io_q_net_remote_tod");
1618 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1619 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1624 /*******************************************************************
1625 reads or writes a TIME_OF_DAY_INFO structure.
1626 ********************************************************************/
1627 static BOOL srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
1629 if (tod == NULL) return False;
1631 prs_debug(ps, depth, desc, "srv_io_time_of_day_info");
1636 prs_uint32("elapsedt ", ps, depth, &(tod->elapsedt ));
1637 prs_uint32("msecs ", ps, depth, &(tod->msecs ));
1638 prs_uint32("hours ", ps, depth, &(tod->hours ));
1639 prs_uint32("mins ", ps, depth, &(tod->mins ));
1640 prs_uint32("secs ", ps, depth, &(tod->secs ));
1641 prs_uint32("hunds ", ps, depth, &(tod->hunds ));
1642 prs_uint32("timezone ", ps, depth, &(tod->zone ));
1643 prs_uint32("tintervals ", ps, depth, &(tod->tintervals));
1644 prs_uint32("day ", ps, depth, &(tod->day ));
1645 prs_uint32("month ", ps, depth, &(tod->month ));
1646 prs_uint32("year ", ps, depth, &(tod->year ));
1647 prs_uint32("weekday ", ps, depth, &(tod->weekday ));
1653 /*******************************************************************
1654 makes a TIME_OF_DAY_INFO structure.
1655 ********************************************************************/
1656 BOOL make_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
1657 uint32 hours, uint32 mins, uint32 secs, uint32 hunds,
1658 uint32 zone, uint32 tintervals, uint32 day,
1659 uint32 month, uint32 year, uint32 weekday)
1661 if (tod == NULL) return False;
1663 DEBUG(5,("make_time_of_day_info\n"));
1665 tod->elapsedt = elapsedt;
1672 tod->tintervals = tintervals;
1676 tod->weekday = weekday;
1682 /*******************************************************************
1683 reads or writes a structure.
1684 ********************************************************************/
1685 BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
1687 if (r_n == NULL) return False;
1689 prs_debug(ps, depth, desc, "srv_io_r_net_remote_tod");
1694 prs_uint32("ptr_srv_tod ", ps, depth, &(r_n->ptr_srv_tod));
1696 srv_io_time_of_day_info("tod", r_n->tod, ps, depth);
1698 prs_uint32("status ", ps, depth, &(r_n->status));