summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_srvsvc.h99
-rw-r--r--source3/rpc_parse/parse_srv.c365
2 files changed, 0 insertions, 464 deletions
diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h
index 0d24ec5653..806a7738f6 100644
--- a/source3/include/rpc_srvsvc.h
+++ b/source3/include/rpc_srvsvc.h
@@ -112,109 +112,10 @@ typedef struct {
/***************************/
-/* CONN_INFO_0 (pointers to level 0 connection info strings) */
-typedef struct ptr_conn_info0
-{
- uint32 id; /* connection id. */
-
-} CONN_INFO_0;
-
/* oops - this is going to take up a *massive* amount of stack. */
/* the UNISTR2s already have 1024 uint16 chars in them... */
#define MAX_CONN_ENTRIES 32
-/* SRV_CONN_INFO_0 */
-typedef struct srv_conn_info_0_info
-{
- uint32 num_entries_read; /* EntriesRead */
- uint32 ptr_conn_info; /* Buffer */
- uint32 num_entries_read2; /* EntriesRead */
-
- CONN_INFO_0 info_0 [MAX_CONN_ENTRIES]; /* connection entry pointers */
-
-} SRV_CONN_INFO_0;
-
-/* CONN_INFO_1 (pointers to level 1 connection info strings) */
-typedef struct ptr_conn_info1
-{
- uint32 id; /* connection id */
- uint32 type; /* 0x3 */
- uint32 num_opens;
- uint32 num_users;
- uint32 open_time;
-
- uint32 ptr_usr_name; /* pointer to user name. */
- uint32 ptr_net_name; /* pointer to network name (e.g IPC$). */
-
-} CONN_INFO_1;
-
-/* CONN_INFO_1_STR (level 1 connection info strings) */
-typedef struct str_conn_info1
-{
- UNISTR2 uni_usr_name; /* unicode string of user */
- UNISTR2 uni_net_name; /* unicode string of name */
-
-} CONN_INFO_1_STR;
-
-/* SRV_CONN_INFO_1 */
-typedef struct srv_conn_info_1_info
-{
- uint32 num_entries_read; /* EntriesRead */
- uint32 ptr_conn_info; /* Buffer */
- uint32 num_entries_read2; /* EntriesRead */
-
- CONN_INFO_1 info_1 [MAX_CONN_ENTRIES]; /* connection entry pointers */
- CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES]; /* connection entry strings */
-
-} SRV_CONN_INFO_1;
-
-/* SRV_CONN_INFO_CTR */
-typedef struct srv_conn_info_ctr_info
-{
- uint32 switch_value; /* switch value */
- uint32 ptr_conn_ctr; /* pointer to conn info union */
- union
- {
- SRV_CONN_INFO_0 info0; /* connection info level 0 */
- SRV_CONN_INFO_1 info1; /* connection info level 1 */
-
- } conn;
-
-} SRV_CONN_INFO_CTR;
-
-
-/* SRV_Q_NET_CONN_ENUM */
-typedef struct q_net_conn_enum_info
-{
- uint32 ptr_srv_name; /* pointer (to server name) */
- UNISTR2 uni_srv_name; /* server name "\\server" */
-
- uint32 ptr_qual_name; /* pointer (to qualifier name) */
- UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
-
- uint32 conn_level; /* connection level */
-
- SRV_CONN_INFO_CTR *ctr;
-
- uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
- ENUM_HND enum_hnd;
-
-} SRV_Q_NET_CONN_ENUM;
-
-/* SRV_R_NET_CONN_ENUM */
-typedef struct r_net_conn_enum_info
-{
- uint32 conn_level; /* share level */
-
- SRV_CONN_INFO_CTR *ctr;
-
- uint32 total_entries; /* total number of entries */
- ENUM_HND enum_hnd;
-
- WERROR status; /* return status */
-
-} SRV_R_NET_CONN_ENUM;
-
/***************************/
#endif /* _RPC_SRVSVC_H */
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 975525430e..afaf592d42 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -333,368 +333,3 @@ bool srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_stru
return True;
}
-
-/*******************************************************************
- Inits a CONN_INFO_0 structure
-********************************************************************/
-
-void init_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id)
-{
- DEBUG(5,("init_srv_conn_info0\n"));
-
- ss0->id = id;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_conn_info0(const char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
-{
- if (ss0 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_conn_info0");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("id", ps, depth, &ss0->id))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_srv_conn_info_0(const char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
-{
- if (ss0 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_srv_conn_info_0");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("num_entries_read", ps, depth, &ss0->num_entries_read))
- return False;
- if(!prs_uint32("ptr_conn_info", ps, depth, &ss0->ptr_conn_info))
- return False;
-
- if (ss0->ptr_conn_info != 0) {
- int i;
- int num_entries = ss0->num_entries_read;
-
- if (num_entries > MAX_CONN_ENTRIES) {
- num_entries = MAX_CONN_ENTRIES; /* report this! */
- }
-
- if(!prs_uint32("num_entries_read2", ps, depth, &ss0->num_entries_read2))
- return False;
-
- for (i = 0; i < num_entries; i++) {
- if(!srv_io_conn_info0("", &ss0->info_0[i], ps, depth))
- return False;
- }
-
- if(!prs_align(ps))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Inits a CONN_INFO_1_STR structure
-********************************************************************/
-
-void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, const char *usr_name, const char *net_name)
-{
- DEBUG(5,("init_srv_conn_info1_str\n"));
-
- init_unistr2(&ss1->uni_usr_name, usr_name, UNI_STR_TERMINATE);
- init_unistr2(&ss1->uni_net_name, net_name, UNI_STR_TERMINATE);
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_conn_info1_str(const char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
-{
- if (ss1 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_conn_info1_str");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unistr2("", &ss1->uni_usr_name, True, ps, depth))
- return False;
- if(!smb_io_unistr2("", &ss1->uni_net_name, True, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Inits a CONN_INFO_1 structure
-********************************************************************/
-
-void init_srv_conn_info1(CONN_INFO_1 *ss1,
- uint32 id, uint32 type,
- uint32 num_opens, uint32 num_users, uint32 open_time,
- const char *usr_name, const char *net_name)
-{
- DEBUG(5,("init_srv_conn_info1: %s %s\n", usr_name, net_name));
-
- ss1->id = id ;
- ss1->type = type ;
- ss1->num_opens = num_opens ;
- ss1->num_users = num_users;
- ss1->open_time = open_time;
-
- ss1->ptr_usr_name = (usr_name != NULL) ? 1 : 0;
- ss1->ptr_net_name = (net_name != NULL) ? 1 : 0;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_conn_info1(const char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
-{
- if (ss1 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_conn_info1");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("id ", ps, depth, &ss1->id))
- return False;
- if(!prs_uint32("type ", ps, depth, &ss1->type))
- return False;
- if(!prs_uint32("num_opens ", ps, depth, &ss1->num_opens))
- return False;
- if(!prs_uint32("num_users ", ps, depth, &ss1->num_users))
- return False;
- if(!prs_uint32("open_time ", ps, depth, &ss1->open_time))
- return False;
-
- if(!prs_uint32("ptr_usr_name", ps, depth, &ss1->ptr_usr_name))
- return False;
- if(!prs_uint32("ptr_net_name", ps, depth, &ss1->ptr_net_name))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_srv_conn_info_1(const char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
-{
- if (ss1 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_srv_conn_info_1");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("num_entries_read", ps, depth, &ss1->num_entries_read))
- return False;
- if(!prs_uint32("ptr_conn_info", ps, depth, &ss1->ptr_conn_info))
- return False;
-
- if (ss1->ptr_conn_info != 0) {
- int i;
- int num_entries = ss1->num_entries_read;
-
- if (num_entries > MAX_CONN_ENTRIES) {
- num_entries = MAX_CONN_ENTRIES; /* report this! */
- }
-
- if(!prs_uint32("num_entries_read2", ps, depth, &ss1->num_entries_read2))
- return False;
-
- for (i = 0; i < num_entries; i++) {
- if(!srv_io_conn_info1("", &ss1->info_1[i], ps, depth))
- return False;
- }
-
- for (i = 0; i < num_entries; i++) {
- if(!srv_io_conn_info1_str("", &ss1->info_1_str[i], ps, depth))
- return False;
- }
-
- if(!prs_align(ps))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-static bool srv_io_srv_conn_ctr(const char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
-{
- SRV_CONN_INFO_CTR *ctr = *pp_ctr;
-
- prs_debug(ps, depth, desc, "srv_io_srv_conn_ctr");
- depth++;
-
- if (UNMARSHALLING(ps)) {
- ctr = *pp_ctr = PRS_ALLOC_MEM(ps, SRV_CONN_INFO_CTR, 1);
- if (ctr == NULL)
- return False;
- }
-
- if (ctr == NULL)
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("switch_value", ps, depth, &ctr->switch_value))
- return False;
- if(!prs_uint32("ptr_conn_ctr", ps, depth, &ctr->ptr_conn_ctr))
- return False;
-
- if (ctr->ptr_conn_ctr != 0) {
- switch (ctr->switch_value) {
- case 0:
- if(!srv_io_srv_conn_info_0("", &ctr->conn.info0, ps, depth))
- return False;
- break;
- case 1:
- if(!srv_io_srv_conn_info_1("", &ctr->conn.info1, ps, depth))
- return False;
- break;
- default:
- DEBUG(5,("%s no connection info at switch_value %d\n",
- tab_depth(5,depth), ctr->switch_value));
- break;
- }
- }
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
- const char *srv_name, const char *qual_name,
- uint32 conn_level, SRV_CONN_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
-{
- DEBUG(5,("init_q_net_conn_enum\n"));
-
- q_n->ctr = ctr;
-
- init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name );
- init_buf_unistr2(&q_n->uni_qual_name, &q_n->ptr_qual_name, qual_name);
-
- q_n->conn_level = conn_level;
- q_n->preferred_len = preferred_len;
-
- memcpy(&q_n->enum_hnd, hnd, sizeof(*hnd));
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-bool srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
-{
- if (q_n == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_q_net_conn_enum");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr_srv_name ", ps, depth, &q_n->ptr_srv_name))
- return False;
- if(!smb_io_unistr2("", &q_n->uni_srv_name, q_n->ptr_srv_name, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr_qual_name", ps, depth, &q_n->ptr_qual_name))
- return False;
- if(!smb_io_unistr2("", &q_n->uni_qual_name, q_n->ptr_qual_name, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("conn_level", ps, depth, &q_n->conn_level))
- return False;
-
- if (q_n->conn_level != (uint32)-1) {
- if(!srv_io_srv_conn_ctr("conn_ctr", &q_n->ctr, ps, depth))
- return False;
- }
-
- if(!prs_uint32("preferred_len", ps, depth, &q_n->preferred_len))
- return False;
-
- if(!smb_io_enum_hnd("enum_hnd", &q_n->enum_hnd, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes a structure.
-********************************************************************/
-
-bool srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
-{
- if (r_n == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "srv_io_r_net_conn_enum");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("conn_level", ps, depth, &r_n->conn_level))
- return False;
-
- if (r_n->conn_level != (uint32)-1) {
- if(!srv_io_srv_conn_ctr("conn_ctr", &r_n->ctr, ps, depth))
- return False;
- }
-
- if(!prs_uint32("total_entries", ps, depth, &r_n->total_entries))
- return False;
- if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth))
- return False;
- if(!prs_werror("status", ps, depth, &r_n->status))
- return False;
-
- return True;
-}