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);
59 smb_io_unistr2("", &(sh1->uni_remark ), True, ps, depth);
64 /*******************************************************************
65 makes a SH_INFO_1 structure
66 ********************************************************************/
67 BOOL make_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark)
69 if (sh1 == NULL) return False;
71 DEBUG(5,("make_srv_share_info1: %s %8x %s\n", net_name, type, remark));
73 sh1->ptr_netname = net_name != NULL ? 1 : 0;
75 sh1->ptr_remark = remark != NULL ? 1 : 0;
80 /*******************************************************************
81 reads or writes a structure.
82 ********************************************************************/
83 static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
85 if (sh1 == NULL) return False;
87 prs_debug(ps, depth, desc, "srv_io_share_info1");
92 prs_uint32("ptr_netname", ps, depth, &(sh1->ptr_netname));
93 prs_uint32("type ", ps, depth, &(sh1->type ));
94 prs_uint32("ptr_remark ", ps, depth, &(sh1->ptr_remark));
99 /*******************************************************************
100 reads or writes a structure.
101 ********************************************************************/
102 static BOOL srv_io_srv_share_info_1(char *desc, SRV_SHARE_INFO_1 *ctr, prs_struct *ps, int depth)
104 if (ctr == NULL) return False;
106 prs_debug(ps, depth, desc, "srv_io_share_1_ctr");
111 prs_uint32("num_entries_read", ps, depth, &(ctr->num_entries_read));
112 prs_uint32("ptr_share_info", ps, depth, &(ctr->ptr_share_info));
114 if (ctr->ptr_share_info != 0)
117 int num_entries = ctr->num_entries_read;
118 if (num_entries > MAX_SHARE_ENTRIES)
120 num_entries = MAX_SHARE_ENTRIES; /* report this! */
123 prs_uint32("num_entries_read2", ps, depth, &(ctr->num_entries_read2));
125 SMB_ASSERT_ARRAY(ctr->info_1, num_entries);
127 for (i = 0; i < num_entries; i++)
130 srv_io_share_info1("", &(ctr->info_1[i]), ps, depth);
133 for (i = 0; i < num_entries; i++)
136 srv_io_share_info1_str("", &(ctr->info_1_str[i]), ps, depth);
145 /*******************************************************************
146 makes a SH_INFO_2_STR structure
147 ********************************************************************/
148 BOOL make_srv_share_info2_str(SH_INFO_2_STR *sh2,
149 char *net_name, char *remark,
150 char *path, char *passwd)
152 if (sh2 == NULL) return False;
154 DEBUG(5,("make_srv_share_info2_str\n"));
156 make_unistr2(&(sh2->uni_netname), net_name, strlen(net_name)+1);
157 make_unistr2(&(sh2->uni_remark ), remark , strlen(remark )+1);
158 make_unistr2(&(sh2->uni_path ), path , strlen(path )+1);
159 make_unistr2(&(sh2->uni_passwd ), passwd , strlen(passwd )+1);
164 /*******************************************************************
165 reads or writes a structure.
166 ********************************************************************/
167 static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
169 if (sh2 == NULL) return False;
171 prs_debug(ps, depth, desc, "srv_io_share_info2_str");
176 smb_io_unistr2("", &(sh2->uni_netname), True, ps, depth);
177 smb_io_unistr2("", &(sh2->uni_remark ), True, ps, depth);
178 smb_io_unistr2("", &(sh2->uni_path ), True, ps, depth);
179 smb_io_unistr2("", &(sh2->uni_passwd ), True, ps, depth);
184 /*******************************************************************
185 makes a SH_INFO_2 structure
186 ********************************************************************/
187 BOOL make_srv_share_info2(SH_INFO_2 *sh2,
188 char *net_name, uint32 type, char *remark,
189 uint32 perms, uint32 max_uses, uint32 num_uses,
190 char *path, char *passwd)
192 if (sh2 == NULL) return False;
194 DEBUG(5,("make_srv_share_info2: %s %8x %s\n", net_name, type, remark));
196 sh2->ptr_netname = net_name != NULL ? 1 : 0;
198 sh2->ptr_remark = remark != NULL ? 1 : 0;
200 sh2->max_uses = max_uses;
201 sh2->num_uses = num_uses;
203 sh2->ptr_path = path != NULL ? 1 : 0;
204 sh2->ptr_passwd = passwd != NULL ? 1 : 0;
209 /*******************************************************************
210 reads or writes a structure.
211 ********************************************************************/
212 static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
214 if (sh2 == NULL) return False;
216 prs_debug(ps, depth, desc, "srv_io_share_info2");
221 prs_uint32("ptr_netname", ps, depth, &(sh2->ptr_netname));
222 prs_uint32("type ", ps, depth, &(sh2->type ));
223 prs_uint32("ptr_remark ", ps, depth, &(sh2->ptr_remark ));
224 prs_uint32("perms ", ps, depth, &(sh2->perms ));
225 prs_uint32("max_uses ", ps, depth, &(sh2->max_uses ));
226 prs_uint32("num_uses ", ps, depth, &(sh2->num_uses ));
227 prs_uint32("ptr_path ", ps, depth, &(sh2->ptr_path ));
228 prs_uint32("ptr_passwd ", ps, depth, &(sh2->ptr_passwd ));
233 /*******************************************************************
234 reads or writes a structure.
235 ********************************************************************/
236 static BOOL srv_io_srv_share_info_2(char *desc, SRV_SHARE_INFO_2 *ctr, prs_struct *ps, int depth)
238 if (ctr == NULL) return False;
240 prs_debug(ps, depth, desc, "srv_io_share_2_ctr");
245 prs_uint32("num_entries_read", ps, depth, &(ctr->num_entries_read));
246 prs_uint32("ptr_share_info", ps, depth, &(ctr->ptr_share_info));
248 if (ctr->ptr_share_info != 0)
251 int num_entries = ctr->num_entries_read;
252 if (num_entries > MAX_SHARE_ENTRIES)
254 num_entries = MAX_SHARE_ENTRIES; /* report this! */
257 prs_uint32("num_entries_read2", ps, depth, &(ctr->num_entries_read2));
259 SMB_ASSERT_ARRAY(ctr->info_2, num_entries);
261 for (i = 0; i < num_entries; i++)
264 srv_io_share_info2("", &(ctr->info_2[i]), ps, depth);
267 for (i = 0; i < num_entries; i++)
270 srv_io_share_info2_str("", &(ctr->info_2_str[i]), ps, depth);
279 /*******************************************************************
280 reads or writes a structure.
281 ********************************************************************/
282 static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
284 if (ctr == NULL) return False;
286 prs_debug(ps, depth, desc, "srv_io_srv_share_ctr");
291 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
292 prs_uint32("ptr_share_ctr", ps, depth, &(ctr->ptr_share_ctr));
294 if (ctr->ptr_share_ctr != 0)
296 switch (ctr->switch_value)
300 srv_io_srv_share_info_2("", &(ctr->share.info2), ps, depth);
305 srv_io_srv_share_info_1("", &(ctr->share.info1), ps, depth);
310 DEBUG(5,("%s no share info at switch_value %d\n",
311 tab_depth(depth), ctr->switch_value));
320 /*******************************************************************
321 reads or writes a structure.
322 ********************************************************************/
323 BOOL make_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
325 uint32 share_level, SRV_SHARE_INFO_CTR *ctr,
326 uint32 preferred_len,
329 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
333 DEBUG(5,("make_q_net_share_enum\n"));
335 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
337 q_n->share_level = share_level;
338 q_n->preferred_len = preferred_len;
340 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
345 /*******************************************************************
346 reads or writes a structure.
347 ********************************************************************/
348 BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
350 if (q_n == NULL) return False;
352 prs_debug(ps, depth, desc, "srv_io_q_net_share_enum");
357 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
358 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
362 prs_uint32("share_level", ps, depth, &(q_n->share_level ));
364 if (q_n->share_level != -1)
366 srv_io_srv_share_ctr("share_ctr", q_n->ctr, ps, depth);
369 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
371 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
376 /*******************************************************************
377 reads or writes a structure.
378 ********************************************************************/
379 BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
381 if (r_n == NULL) return False;
383 prs_debug(ps, depth, desc, "srv_io_r_net_share_enum");
388 prs_uint32("share_level", ps, depth, &(r_n->share_level));
390 if (r_n->share_level != 0)
392 srv_io_srv_share_ctr("share_ctr", r_n->ctr, ps, depth);
395 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
396 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
397 prs_uint32("status ", ps, depth, &(r_n->status));
402 /*******************************************************************
403 makes a SESS_INFO_0_STR structure
404 ********************************************************************/
405 BOOL make_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name)
407 if (ss0 == NULL) return False;
409 DEBUG(5,("make_srv_sess_info0_str\n"));
411 make_unistr2(&(ss0->uni_name), name, strlen(name)+1);
416 /*******************************************************************
417 reads or writes a structure.
418 ********************************************************************/
419 static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
421 if (ss0 == NULL) return False;
423 prs_debug(ps, depth, desc, "srv_io_sess_info0_str");
428 smb_io_unistr2("", &(ss0->uni_name), True, ps, depth);
433 /*******************************************************************
434 makes a SESS_INFO_0 structure
435 ********************************************************************/
436 BOOL make_srv_sess_info0(SESS_INFO_0 *ss0, char *name)
438 if (ss0 == NULL) return False;
440 DEBUG(5,("make_srv_sess_info0: %s\n", name));
442 ss0->ptr_name = name != NULL ? 1 : 0;
447 /*******************************************************************
448 reads or writes a structure.
449 ********************************************************************/
450 static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
452 if (ss0 == NULL) return False;
454 prs_debug(ps, depth, desc, "srv_io_sess_info0");
459 prs_uint32("ptr_name", ps, depth, &(ss0->ptr_name));
464 /*******************************************************************
465 reads or writes a structure.
466 ********************************************************************/
467 static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
469 if (ss0 == NULL) return False;
471 prs_debug(ps, depth, desc, "srv_io_srv_sess_info_0");
476 prs_uint32("num_entries_read", ps, depth, &(ss0->num_entries_read));
477 prs_uint32("ptr_sess_info", ps, depth, &(ss0->ptr_sess_info));
479 if (ss0->ptr_sess_info != 0)
482 int num_entries = ss0->num_entries_read;
483 if (num_entries > MAX_SESS_ENTRIES)
485 num_entries = MAX_SESS_ENTRIES; /* report this! */
488 prs_uint32("num_entries_read2", ps, depth, &(ss0->num_entries_read2));
490 SMB_ASSERT_ARRAY(ss0->info_0, num_entries);
492 for (i = 0; i < num_entries; i++)
495 srv_io_sess_info0("", &(ss0->info_0[i]), ps, depth);
498 for (i = 0; i < num_entries; i++)
501 srv_io_sess_info0_str("", &(ss0->info_0_str[i]), ps, depth);
510 /*******************************************************************
511 makes a SESS_INFO_1_STR structure
512 ********************************************************************/
513 BOOL make_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
515 if (ss1 == NULL) return False;
517 DEBUG(5,("make_srv_sess_info1_str\n"));
519 make_unistr2(&(ss1->uni_name), name, strlen(name)+1);
520 make_unistr2(&(ss1->uni_user), name, strlen(user)+1);
525 /*******************************************************************
526 reads or writes a structure.
527 ********************************************************************/
528 static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
530 if (ss1 == NULL) return False;
532 prs_debug(ps, depth, desc, "srv_io_sess_info1_str");
537 smb_io_unistr2("", &(ss1->uni_name), True, ps, depth);
538 smb_io_unistr2("", &(ss1->uni_user), True, ps, depth);
543 /*******************************************************************
544 makes a SESS_INFO_1 structure
545 ********************************************************************/
546 BOOL make_srv_sess_info1(SESS_INFO_1 *ss1,
547 char *name, char *user,
548 uint32 num_opens, uint32 open_time, uint32 idle_time,
551 if (ss1 == NULL) return False;
553 DEBUG(5,("make_srv_sess_info1: %s\n", name));
555 ss1->ptr_name = name != NULL ? 1 : 0;
556 ss1->ptr_user = user != NULL ? 1 : 0;
558 ss1->num_opens = num_opens;
559 ss1->open_time = open_time;
560 ss1->idle_time = idle_time;
561 ss1->user_flags = user_flags;
566 /*******************************************************************
567 reads or writes a structure.
568 ********************************************************************/
569 static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
571 if (ss1 == NULL) return False;
573 prs_debug(ps, depth, desc, "srv_io_sess_info1");
578 prs_uint32("ptr_name ", ps, depth, &(ss1->ptr_name ));
579 prs_uint32("ptr_user ", ps, depth, &(ss1->ptr_user ));
581 prs_uint32("num_opens ", ps, depth, &(ss1->num_opens ));
582 prs_uint32("open_time ", ps, depth, &(ss1->open_time ));
583 prs_uint32("idle_time ", ps, depth, &(ss1->idle_time ));
584 prs_uint32("user_flags", ps, depth, &(ss1->user_flags));
589 /*******************************************************************
590 reads or writes a structure.
591 ********************************************************************/
592 static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
594 if (ss1 == NULL) return False;
596 prs_debug(ps, depth, desc, "srv_io_srv_sess_info_1");
601 prs_uint32("num_entries_read", ps, depth, &(ss1->num_entries_read));
602 prs_uint32("ptr_sess_info", ps, depth, &(ss1->ptr_sess_info));
604 if (ss1->ptr_sess_info != 0)
607 int num_entries = ss1->num_entries_read;
608 if (num_entries > MAX_SESS_ENTRIES)
610 num_entries = MAX_SESS_ENTRIES; /* report this! */
613 prs_uint32("num_entries_read2", ps, depth, &(ss1->num_entries_read2));
615 SMB_ASSERT_ARRAY(ss1->info_1, num_entries);
617 for (i = 0; i < num_entries; i++)
620 srv_io_sess_info1("", &(ss1->info_1[i]), ps, depth);
623 for (i = 0; i < num_entries; i++)
626 srv_io_sess_info1_str("", &(ss1->info_1_str[i]), ps, depth);
635 /*******************************************************************
636 reads or writes a structure.
637 ********************************************************************/
638 static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR *ctr, prs_struct *ps, int depth)
640 if (ctr == NULL) return False;
642 prs_debug(ps, depth, desc, "srv_io_srv_sess_ctr");
647 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
648 prs_uint32("ptr_sess_ctr", ps, depth, &(ctr->ptr_sess_ctr));
650 if (ctr->ptr_sess_ctr != 0)
652 switch (ctr->switch_value)
656 srv_io_srv_sess_info_0("", &(ctr->sess.info0), ps, depth);
661 srv_io_srv_sess_info_1("", &(ctr->sess.info1), ps, depth);
666 DEBUG(5,("%s no session info at switch_value %d\n",
667 tab_depth(depth), ctr->switch_value));
676 /*******************************************************************
677 reads or writes a structure.
678 ********************************************************************/
679 BOOL make_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
680 char *srv_name, char *qual_name,
682 uint32 sess_level, SRV_SESS_INFO_CTR *ctr,
683 uint32 preferred_len,
686 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
690 DEBUG(5,("make_q_net_sess_enum\n"));
692 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
693 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
694 make_buf_unistr2(&(q_n->uni_user_name), &(q_n->ptr_user_name), user_name);
696 q_n->sess_level = sess_level;
697 q_n->preferred_len = preferred_len;
699 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
704 /*******************************************************************
705 reads or writes a structure.
706 ********************************************************************/
707 BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth)
709 if (q_n == NULL) return False;
711 prs_debug(ps, depth, desc, "srv_io_q_net_sess_enum");
716 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
717 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
721 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
722 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
725 prs_uint32("ptr_user_name", ps, depth, &(q_n->ptr_user_name));
726 smb_io_unistr2("", &(q_n->uni_user_name), q_n->ptr_user_name, ps, depth);
729 prs_uint32("sess_level", ps, depth, &(q_n->sess_level ));
731 if (q_n->sess_level != -1)
733 srv_io_srv_sess_ctr("sess_ctr", q_n->ctr, ps, depth);
736 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
738 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
743 /*******************************************************************
744 reads or writes a structure.
745 ********************************************************************/
746 BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
748 if (r_n == NULL) return False;
750 prs_debug(ps, depth, desc, "srv_io_r_net_sess_enum");
755 prs_uint32("sess_level", ps, depth, &(r_n->sess_level));
757 if (r_n->sess_level != -1)
759 srv_io_srv_sess_ctr("sess_ctr", r_n->ctr, ps, depth);
762 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
763 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
764 prs_uint32("status ", ps, depth, &(r_n->status));
769 /*******************************************************************
770 makes a CONN_INFO_0 structure
771 ********************************************************************/
772 BOOL make_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id)
774 if (ss0 == NULL) return False;
776 DEBUG(5,("make_srv_conn_info0\n"));
783 /*******************************************************************
784 reads or writes a structure.
785 ********************************************************************/
786 static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
788 if (ss0 == NULL) return False;
790 prs_debug(ps, depth, desc, "srv_io_conn_info0");
795 prs_uint32("id", ps, depth, &(ss0->id));
800 /*******************************************************************
801 reads or writes a structure.
802 ********************************************************************/
803 static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
805 if (ss0 == NULL) return False;
807 prs_debug(ps, depth, desc, "srv_io_srv_conn_info_0");
812 prs_uint32("num_entries_read", ps, depth, &(ss0->num_entries_read));
813 prs_uint32("ptr_conn_info", ps, depth, &(ss0->ptr_conn_info));
815 if (ss0->ptr_conn_info != 0)
818 int num_entries = ss0->num_entries_read;
819 if (num_entries > MAX_CONN_ENTRIES)
821 num_entries = MAX_CONN_ENTRIES; /* report this! */
824 prs_uint32("num_entries_read2", ps, depth, &(ss0->num_entries_read2));
826 for (i = 0; i < num_entries; i++)
829 srv_io_conn_info0("", &(ss0->info_0[i]), ps, depth);
838 /*******************************************************************
839 makes a CONN_INFO_1_STR structure
840 ********************************************************************/
841 BOOL make_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_name)
843 if (ss1 == NULL) return False;
845 DEBUG(5,("make_srv_conn_info1_str\n"));
847 make_unistr2(&(ss1->uni_usr_name), usr_name, strlen(usr_name)+1);
848 make_unistr2(&(ss1->uni_net_name), net_name, strlen(net_name)+1);
853 /*******************************************************************
854 reads or writes a structure.
855 ********************************************************************/
856 static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
858 if (ss1 == NULL) return False;
860 prs_debug(ps, depth, desc, "srv_io_conn_info1_str");
865 smb_io_unistr2("", &(ss1->uni_usr_name), True, ps, depth);
866 smb_io_unistr2("", &(ss1->uni_net_name), True, ps, depth);
871 /*******************************************************************
872 makes a CONN_INFO_1 structure
873 ********************************************************************/
874 BOOL make_srv_conn_info1(CONN_INFO_1 *ss1,
875 uint32 id, uint32 type,
876 uint32 num_opens, uint32 num_users, uint32 open_time,
877 char *usr_name, char *net_name)
879 if (ss1 == NULL) return False;
881 DEBUG(5,("make_srv_conn_info1: %s %s\n", usr_name, net_name));
885 ss1->num_opens = num_opens ;
886 ss1->num_users = num_users;
887 ss1->open_time = open_time;
889 ss1->ptr_usr_name = usr_name != NULL ? 1 : 0;
890 ss1->ptr_net_name = net_name != NULL ? 1 : 0;
895 /*******************************************************************
896 reads or writes a structure.
897 ********************************************************************/
898 static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
900 if (ss1 == NULL) return False;
902 prs_debug(ps, depth, desc, "srv_io_conn_info1");
907 prs_uint32("id ", ps, depth, &(ss1->id ));
908 prs_uint32("type ", ps, depth, &(ss1->type ));
909 prs_uint32("num_opens ", ps, depth, &(ss1->num_opens ));
910 prs_uint32("num_users ", ps, depth, &(ss1->num_users ));
911 prs_uint32("open_time ", ps, depth, &(ss1->open_time ));
913 prs_uint32("ptr_usr_name", ps, depth, &(ss1->ptr_usr_name));
914 prs_uint32("ptr_net_name", ps, depth, &(ss1->ptr_net_name));
919 /*******************************************************************
920 reads or writes a structure.
921 ********************************************************************/
922 static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
924 if (ss1 == NULL) return False;
926 prs_debug(ps, depth, desc, "srv_io_srv_conn_info_1");
931 prs_uint32("num_entries_read", ps, depth, &(ss1->num_entries_read));
932 prs_uint32("ptr_conn_info", ps, depth, &(ss1->ptr_conn_info));
934 if (ss1->ptr_conn_info != 0)
937 int num_entries = ss1->num_entries_read;
938 if (num_entries > MAX_CONN_ENTRIES)
940 num_entries = MAX_CONN_ENTRIES; /* report this! */
943 prs_uint32("num_entries_read2", ps, depth, &(ss1->num_entries_read2));
945 for (i = 0; i < num_entries; i++)
948 srv_io_conn_info1("", &(ss1->info_1[i]), ps, depth);
951 for (i = 0; i < num_entries; i++)
954 srv_io_conn_info1_str("", &(ss1->info_1_str[i]), ps, depth);
963 /*******************************************************************
964 reads or writes a structure.
965 ********************************************************************/
966 static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR *ctr, prs_struct *ps, int depth)
968 if (ctr == NULL) return False;
970 prs_debug(ps, depth, desc, "srv_io_srv_conn_ctr");
975 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
976 prs_uint32("ptr_conn_ctr", ps, depth, &(ctr->ptr_conn_ctr));
978 if (ctr->ptr_conn_ctr != 0)
980 switch (ctr->switch_value)
984 srv_io_srv_conn_info_0("", &(ctr->conn.info0), ps, depth);
989 srv_io_srv_conn_info_1("", &(ctr->conn.info1), ps, depth);
994 DEBUG(5,("%s no connection info at switch_value %d\n",
995 tab_depth(depth), ctr->switch_value));
1004 /*******************************************************************
1005 reads or writes a structure.
1006 ********************************************************************/
1007 BOOL make_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
1008 char *srv_name, char *qual_name,
1009 uint32 conn_level, SRV_CONN_INFO_CTR *ctr,
1010 uint32 preferred_len,
1013 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
1017 DEBUG(5,("make_q_net_conn_enum\n"));
1019 make_buf_unistr2(&(q_n->uni_srv_name ), &(q_n->ptr_srv_name ), srv_name );
1020 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
1022 q_n->conn_level = conn_level;
1023 q_n->preferred_len = preferred_len;
1025 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
1030 /*******************************************************************
1031 reads or writes a structure.
1032 ********************************************************************/
1033 BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
1035 if (q_n == NULL) return False;
1037 prs_debug(ps, depth, desc, "srv_io_q_net_conn_enum");
1042 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1043 smb_io_unistr2("", &(q_n->uni_srv_name), q_n->ptr_srv_name, ps, depth);
1047 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
1048 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
1052 prs_uint32("conn_level", ps, depth, &(q_n->conn_level ));
1054 if (q_n->conn_level != -1)
1056 srv_io_srv_conn_ctr("conn_ctr", q_n->ctr, ps, depth);
1059 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
1061 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
1066 /*******************************************************************
1067 reads or writes a structure.
1068 ********************************************************************/
1069 BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
1071 if (r_n == NULL) return False;
1073 prs_debug(ps, depth, desc, "srv_io_r_net_conn_enum");
1078 prs_uint32("conn_level", ps, depth, &(r_n->conn_level));
1080 if (r_n->conn_level != -1)
1082 srv_io_srv_conn_ctr("conn_ctr", r_n->ctr, ps, depth);
1085 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
1086 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
1087 prs_uint32("status ", ps, depth, &(r_n->status));
1092 /*******************************************************************
1093 makes a FILE_INFO_3_STR structure
1094 ********************************************************************/
1095 BOOL make_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_name)
1097 if (fi3 == NULL) return False;
1099 DEBUG(5,("make_srv_file_info3_str\n"));
1101 make_unistr2(&(fi3->uni_path_name), path_name, strlen(path_name)+1);
1102 make_unistr2(&(fi3->uni_user_name), user_name, strlen(user_name)+1);
1107 /*******************************************************************
1108 reads or writes a structure.
1109 ********************************************************************/
1110 static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
1112 if (sh1 == NULL) return False;
1114 prs_debug(ps, depth, desc, "srv_io_file_info3_str");
1119 smb_io_unistr2("", &(sh1->uni_path_name), True, ps, depth);
1120 smb_io_unistr2("", &(sh1->uni_user_name), True, ps, depth);
1125 /*******************************************************************
1126 makes a FILE_INFO_3 structure
1127 ********************************************************************/
1128 BOOL make_srv_file_info3(FILE_INFO_3 *fl3,
1129 uint32 id, uint32 perms, uint32 num_locks,
1130 char *path_name, char *user_name)
1132 if (fl3 == NULL) return False;
1134 DEBUG(5,("make_srv_file_info3: %s %s\n", path_name, user_name));
1138 fl3->num_locks = num_locks;
1140 fl3->ptr_path_name = path_name != NULL ? 1 : 0;
1141 fl3->ptr_user_name = user_name != NULL ? 1 : 0;
1146 /*******************************************************************
1147 reads or writes a structure.
1148 ********************************************************************/
1149 static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
1151 if (fl3 == NULL) return False;
1153 prs_debug(ps, depth, desc, "srv_io_file_info3");
1158 prs_uint32("id ", ps, depth, &(fl3->id ));
1159 prs_uint32("perms ", ps, depth, &(fl3->perms ));
1160 prs_uint32("num_locks ", ps, depth, &(fl3->num_locks ));
1161 prs_uint32("ptr_path_name", ps, depth, &(fl3->ptr_path_name));
1162 prs_uint32("ptr_user_name", ps, depth, &(fl3->ptr_user_name));
1167 /*******************************************************************
1168 reads or writes a structure.
1169 ********************************************************************/
1170 static BOOL srv_io_srv_file_info_3(char *desc, SRV_FILE_INFO_3 *fl3, prs_struct *ps, int depth)
1172 if (fl3 == NULL) return False;
1174 prs_debug(ps, depth, desc, "srv_io_file_3_fl3");
1179 prs_uint32("num_entries_read", ps, depth, &(fl3->num_entries_read));
1180 prs_uint32("ptr_file_fl3", ps, depth, &(fl3->ptr_file_info));
1181 if (fl3->ptr_file_info != 0)
1184 int num_entries = fl3->num_entries_read;
1185 if (num_entries > MAX_FILE_ENTRIES)
1187 num_entries = MAX_FILE_ENTRIES; /* report this! */
1190 prs_uint32("num_entries_read2", ps, depth, &(fl3->num_entries_read2));
1192 for (i = 0; i < num_entries; i++)
1195 srv_io_file_info3("", &(fl3->info_3[i]), ps, depth);
1198 for (i = 0; i < num_entries; i++)
1201 srv_io_file_info3_str("", &(fl3->info_3_str[i]), ps, depth);
1210 /*******************************************************************
1211 reads or writes a structure.
1212 ********************************************************************/
1213 static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
1215 if (ctr == NULL) return False;
1217 prs_debug(ps, depth, desc, "srv_io_srv_file_ctr");
1222 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
1223 prs_uint32("ptr_file_ctr", ps, depth, &(ctr->ptr_file_ctr));
1225 if (ctr->ptr_file_ctr != 0)
1227 switch (ctr->switch_value)
1231 srv_io_srv_file_info_3("", &(ctr->file.info3), ps, depth);
1236 DEBUG(5,("%s no file info at switch_value %d\n",
1237 tab_depth(depth), ctr->switch_value));
1246 /*******************************************************************
1247 reads or writes a structure.
1248 ********************************************************************/
1249 BOOL make_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n,
1250 char *srv_name, char *qual_name, uint32 file_id,
1251 uint32 file_level, SRV_FILE_INFO_CTR *ctr,
1252 uint32 preferred_len,
1255 if (q_n == NULL || ctr == NULL || hnd == NULL) return False;
1259 DEBUG(5,("make_q_net_file_enum\n"));
1261 make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
1262 make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
1264 q_n->file_id = file_id;
1265 q_n->file_level = file_level;
1266 q_n->preferred_len = preferred_len;
1268 memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
1273 /*******************************************************************
1274 reads or writes a structure.
1275 ********************************************************************/
1276 BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth)
1278 if (q_n == NULL) return False;
1280 prs_debug(ps, depth, desc, "srv_io_q_net_file_enum");
1285 prs_uint32("ptr_srv_name", ps, depth, &(q_n->ptr_srv_name));
1286 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1290 prs_uint32("ptr_qual_name", ps, depth, &(q_n->ptr_qual_name));
1291 smb_io_unistr2("", &(q_n->uni_qual_name), q_n->ptr_qual_name, ps, depth);
1295 prs_uint32("file_id ", ps, depth, &(q_n->file_id ));
1296 prs_uint32("file_level", ps, depth, &(q_n->file_level));
1298 if (q_n->file_level != -1)
1300 srv_io_srv_file_ctr("file_ctr", q_n->ctr, ps, depth);
1303 prs_uint32("preferred_len", ps, depth, &(q_n->preferred_len));
1305 smb_io_enum_hnd("enum_hnd", &(q_n->enum_hnd), ps, depth);
1310 /*******************************************************************
1311 reads or writes a structure.
1312 ********************************************************************/
1313 BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
1315 if (r_n == NULL) return False;
1317 prs_debug(ps, depth, desc, "srv_io_r_net_file_enum");
1322 prs_uint32("file_level", ps, depth, &(r_n->file_level));
1324 if (r_n->file_level != 0)
1326 srv_io_srv_file_ctr("file_ctr", r_n->ctr, ps, depth);
1329 prs_uint32("total_entries", ps, depth, &(r_n->total_entries));
1330 smb_io_enum_hnd("enum_hnd", &(r_n->enum_hnd), ps, depth);
1331 prs_uint32("status ", ps, depth, &(r_n->status));
1336 /*******************************************************************
1337 makes a SRV_INFO_101 structure.
1338 ********************************************************************/
1339 BOOL make_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, char *name,
1340 uint32 ver_major, uint32 ver_minor,
1341 uint32 srv_type, char *comment)
1343 if (sv101 == NULL) return False;
1345 DEBUG(5,("make_srv_info_101\n"));
1347 sv101->platform_id = platform_id;
1348 make_buf_unistr2(&(sv101->uni_name ), &(sv101->ptr_name ) , name );
1349 sv101->ver_major = ver_major;
1350 sv101->ver_minor = ver_minor;
1351 sv101->srv_type = srv_type;
1352 make_buf_unistr2(&(sv101->uni_comment ), &(sv101->ptr_comment) , comment );
1358 /*******************************************************************
1359 reads or writes a SRV_INFO_101 structure.
1360 ********************************************************************/
1361 static BOOL srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
1363 if (sv101 == NULL) return False;
1365 prs_debug(ps, depth, desc, "srv_io_info_101");
1370 prs_uint32("platform_id ", ps, depth, &(sv101->platform_id ));
1371 prs_uint32("ptr_name ", ps, depth, &(sv101->ptr_name ));
1372 prs_uint32("ver_major ", ps, depth, &(sv101->ver_major ));
1373 prs_uint32("ver_minor ", ps, depth, &(sv101->ver_minor ));
1374 prs_uint32("srv_type ", ps, depth, &(sv101->srv_type ));
1375 prs_uint32("ptr_comment ", ps, depth, &(sv101->ptr_comment ));
1379 smb_io_unistr2("uni_name ", &(sv101->uni_name ), True, ps, depth);
1380 smb_io_unistr2("uni_comment ", &(sv101->uni_comment ), True, ps, depth);
1385 /*******************************************************************
1386 makes a SRV_INFO_102 structure.
1387 ********************************************************************/
1388 BOOL make_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, char *name,
1389 char *comment, uint32 ver_major, uint32 ver_minor,
1390 uint32 srv_type, uint32 users, uint32 disc, uint32 hidden,
1391 uint32 announce, uint32 ann_delta, uint32 licenses,
1394 if (sv102 == NULL) return False;
1396 DEBUG(5,("make_srv_info_102\n"));
1398 sv102->platform_id = platform_id;
1399 make_buf_unistr2(&(sv102->uni_name ), &(sv102->ptr_name ), name );
1400 sv102->ver_major = ver_major;
1401 sv102->ver_minor = ver_minor;
1402 sv102->srv_type = srv_type;
1403 make_buf_unistr2(&(sv102->uni_comment ), &(sv102->ptr_comment ), comment );
1405 /* same as 101 up to here */
1407 sv102->users = users;
1409 sv102->hidden = hidden;
1410 sv102->announce = announce;
1411 sv102->ann_delta =ann_delta;
1412 sv102->licenses = licenses;
1413 make_buf_unistr2(&(sv102->uni_usr_path), &(sv102->ptr_usr_path), usr_path);
1419 /*******************************************************************
1420 reads or writes a SRV_INFO_102 structure.
1421 ********************************************************************/
1422 static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
1424 if (sv102 == NULL) return False;
1426 prs_debug(ps, depth, desc, "srv_io_info102");
1431 prs_uint32("platform_id ", ps, depth, &(sv102->platform_id ));
1432 prs_uint32("ptr_name ", ps, depth, &(sv102->ptr_name ));
1433 prs_uint32("ver_major ", ps, depth, &(sv102->ver_major ));
1434 prs_uint32("ver_minor ", ps, depth, &(sv102->ver_minor ));
1435 prs_uint32("srv_type ", ps, depth, &(sv102->srv_type ));
1436 prs_uint32("ptr_comment ", ps, depth, &(sv102->ptr_comment ));
1438 /* same as 101 up to here */
1440 prs_uint32("users ", ps, depth, &(sv102->users ));
1441 prs_uint32("disc ", ps, depth, &(sv102->disc ));
1442 prs_uint32("hidden ", ps, depth, &(sv102->hidden ));
1443 prs_uint32("announce ", ps, depth, &(sv102->announce ));
1444 prs_uint32("ann_delta ", ps, depth, &(sv102->ann_delta ));
1445 prs_uint32("licenses ", ps, depth, &(sv102->licenses ));
1446 prs_uint32("ptr_usr_path", ps, depth, &(sv102->ptr_usr_path));
1448 smb_io_unistr2("uni_name ", &(sv102->uni_name ), True, ps, depth);
1450 smb_io_unistr2("uni_comment ", &(sv102->uni_comment ), True, ps, depth);
1452 smb_io_unistr2("uni_usr_path", &(sv102->uni_usr_path), True, ps, depth);
1457 /*******************************************************************
1458 reads or writes a SRV_INFO_102 structure.
1459 ********************************************************************/
1460 static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
1462 if (ctr == NULL) return False;
1464 prs_debug(ps, depth, desc, "srv_io_info_ctr");
1469 prs_uint32("switch_value", ps, depth, &(ctr->switch_value));
1470 prs_uint32("ptr_srv_ctr ", ps, depth, &(ctr->ptr_srv_ctr ));
1472 if (ctr->ptr_srv_ctr != 0 && ctr->switch_value != 0 && ctr != NULL)
1474 switch (ctr->switch_value)
1478 srv_io_info_101("sv101", &(ctr->srv.sv101), ps, depth);
1483 srv_io_info_102("sv102", &(ctr->srv.sv102), ps, depth);
1488 DEBUG(5,("%s no server info at switch_value %d\n",
1489 tab_depth(depth), ctr->switch_value));
1499 /*******************************************************************
1500 makes a SRV_Q_NET_SRV_GET_INFO structure.
1501 ********************************************************************/
1502 BOOL make_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
1503 char *server_name, uint32 switch_value)
1505 if (srv == NULL) return False;
1507 DEBUG(5,("make_srv_q_net_srv_get_info\n"));
1509 make_buf_unistr2(&(srv->uni_srv_name), &(srv->ptr_srv_name), server_name);
1511 srv->switch_value = switch_value;
1516 /*******************************************************************
1517 reads or writes a structure.
1518 ********************************************************************/
1519 BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
1521 if (q_n == NULL) return False;
1523 prs_debug(ps, depth, desc, "srv_io_q_net_srv_get_info");
1528 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1529 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1533 prs_uint32("switch_value ", ps, depth, &(q_n->switch_value));
1538 /*******************************************************************
1539 makes a SRV_R_NET_SRV_GET_INFO structure.
1540 ********************************************************************/
1541 BOOL make_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv,
1542 uint32 switch_value, SRV_INFO_CTR *ctr, uint32 status)
1544 if (srv == NULL) return False;
1546 DEBUG(5,("make_srv_r_net_srv_get_info\n"));
1552 srv->ctr->switch_value = switch_value;
1553 srv->ctr->ptr_srv_ctr = 1;
1557 srv->ctr->switch_value = 0;
1558 srv->ctr->ptr_srv_ctr = 0;
1561 srv->status = status;
1566 /*******************************************************************
1567 reads or writes a structure.
1568 ********************************************************************/
1569 BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
1571 if (r_n == NULL) return False;
1573 prs_debug(ps, depth, desc, "srv_io_r_net_srv_get_info");
1578 srv_io_info_ctr("ctr", r_n->ctr, ps, depth);
1580 prs_uint32("status ", ps, depth, &(r_n->status ));
1585 /*******************************************************************
1586 makes a SRV_Q_NET_REMOTE_TOD structure.
1587 ********************************************************************/
1588 BOOL make_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_t, char *server_name)
1590 if (q_t == NULL) return False;
1592 DEBUG(5,("make_srv_q_net_remote_tod\n"));
1594 make_buf_unistr2(&(q_t->uni_srv_name), &(q_t->ptr_srv_name), server_name);
1599 /*******************************************************************
1600 reads or writes a structure.
1601 ********************************************************************/
1602 BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
1604 if (q_n == NULL) return False;
1606 prs_debug(ps, depth, desc, "srv_io_q_net_remote_tod");
1611 prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
1612 smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
1617 /*******************************************************************
1618 reads or writes a TIME_OF_DAY_INFO structure.
1619 ********************************************************************/
1620 static BOOL srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
1622 if (tod == NULL) return False;
1624 prs_debug(ps, depth, desc, "srv_io_time_of_day_info");
1629 prs_uint32("elapsedt ", ps, depth, &(tod->elapsedt ));
1630 prs_uint32("msecs ", ps, depth, &(tod->msecs ));
1631 prs_uint32("hours ", ps, depth, &(tod->hours ));
1632 prs_uint32("mins ", ps, depth, &(tod->mins ));
1633 prs_uint32("secs ", ps, depth, &(tod->secs ));
1634 prs_uint32("hunds ", ps, depth, &(tod->hunds ));
1635 prs_uint32("timezone ", ps, depth, &(tod->zone ));
1636 prs_uint32("tintervals ", ps, depth, &(tod->tintervals));
1637 prs_uint32("day ", ps, depth, &(tod->day ));
1638 prs_uint32("month ", ps, depth, &(tod->month ));
1639 prs_uint32("year ", ps, depth, &(tod->year ));
1640 prs_uint32("weekday ", ps, depth, &(tod->weekday ));
1646 /*******************************************************************
1647 makes a TIME_OF_DAY_INFO structure.
1648 ********************************************************************/
1649 BOOL make_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
1650 uint32 hours, uint32 mins, uint32 secs, uint32 hunds,
1651 uint32 zone, uint32 tintervals, uint32 day,
1652 uint32 month, uint32 year, uint32 weekday)
1654 if (tod == NULL) return False;
1656 DEBUG(5,("make_time_of_day_info\n"));
1658 tod->elapsedt = elapsedt;
1665 tod->tintervals = tintervals;
1669 tod->weekday = weekday;
1675 /*******************************************************************
1676 reads or writes a structure.
1677 ********************************************************************/
1678 BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
1680 if (r_n == NULL) return False;
1682 prs_debug(ps, depth, desc, "srv_io_r_net_remote_tod");
1687 prs_uint32("ptr_srv_tod ", ps, depth, &(r_n->ptr_srv_tod));
1689 srv_io_time_of_day_info("tod", r_n->tod, ps, depth);
1691 prs_uint32("status ", ps, depth, &(r_n->status));