summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-13 23:12:42 +0100
committerGünther Deschner <gd@samba.org>2008-02-13 23:12:42 +0100
commitd134bd3c27ba3317e323a2c37d43f80c0ec58cbc (patch)
treeb43d6db46da700b8ae1e9a21d8adeafc7e0760f9 /source3/rpc_parse
parent7acdc9e8d6a6311983e1d3f19047293e47f92722 (diff)
downloadsamba-d134bd3c27ba3317e323a2c37d43f80c0ec58cbc.tar.gz
samba-d134bd3c27ba3317e323a2c37d43f80c0ec58cbc.tar.bz2
samba-d134bd3c27ba3317e323a2c37d43f80c0ec58cbc.zip
Remove unused marshalling for NET_LOGON_CTRL and NET_LOGON_CTRL2.
Guenther (This used to be commit c94538e742e469e4afc6e30d9d99951fda6dd219)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c432
1 files changed, 0 insertions, 432 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 257f461d7c..8105ac5470 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -47,438 +47,6 @@ static bool net_io_neg_flags(const char *desc, NEG_FLAGS *neg, prs_struct *ps, i
}
/*******************************************************************
- Inits a NETLOGON_INFO_3 structure.
-********************************************************************/
-
-static void init_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_attempts)
-{
- info->flags = flags;
- info->logon_attempts = logon_attempts;
- info->reserved_1 = 0x0;
- info->reserved_2 = 0x0;
- info->reserved_3 = 0x0;
- info->reserved_4 = 0x0;
- info->reserved_5 = 0x0;
-}
-
-/*******************************************************************
- Reads or writes a NETLOGON_INFO_3 structure.
-********************************************************************/
-
-static bool net_io_netinfo_3(const char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
-{
- if (info == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_netinfo_3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("flags ", ps, depth, &info->flags))
- return False;
- if(!prs_uint32("logon_attempts", ps, depth, &info->logon_attempts))
- return False;
- if(!prs_uint32("reserved_1 ", ps, depth, &info->reserved_1))
- return False;
- if(!prs_uint32("reserved_2 ", ps, depth, &info->reserved_2))
- return False;
- if(!prs_uint32("reserved_3 ", ps, depth, &info->reserved_3))
- return False;
- if(!prs_uint32("reserved_4 ", ps, depth, &info->reserved_4))
- return False;
- if(!prs_uint32("reserved_5 ", ps, depth, &info->reserved_5))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
- Inits a NETLOGON_INFO_1 structure.
-********************************************************************/
-
-static void init_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_status)
-{
- info->flags = flags;
- info->pdc_status = pdc_status;
-}
-
-/*******************************************************************
- Reads or writes a NETLOGON_INFO_1 structure.
-********************************************************************/
-
-static bool net_io_netinfo_1(const char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
-{
- if (info == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_netinfo_1");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("flags ", ps, depth, &info->flags))
- return False;
- if(!prs_uint32("pdc_status", ps, depth, &info->pdc_status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Inits a NETLOGON_INFO_2 structure.
-********************************************************************/
-
-static void init_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_status,
- uint32 tc_status, const char *trusted_dc_name)
-{
- info->flags = flags;
- info->pdc_status = pdc_status;
- info->ptr_trusted_dc_name = 1;
- info->tc_status = tc_status;
-
- if (trusted_dc_name != NULL)
- init_unistr2(&info->uni_trusted_dc_name, trusted_dc_name, UNI_STR_TERMINATE);
- else
- init_unistr2(&info->uni_trusted_dc_name, "", UNI_STR_TERMINATE);
-}
-
-/*******************************************************************
- Reads or writes a NETLOGON_INFO_2 structure.
-********************************************************************/
-
-static bool net_io_netinfo_2(const char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
-{
- if (info == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_netinfo_2");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("flags ", ps, depth, &info->flags))
- return False;
- if(!prs_uint32("pdc_status ", ps, depth, &info->pdc_status))
- return False;
- if(!prs_uint32("ptr_trusted_dc_name", ps, depth, &info->ptr_trusted_dc_name))
- return False;
- if(!prs_uint32("tc_status ", ps, depth, &info->tc_status))
- return False;
-
- if (info->ptr_trusted_dc_name != 0) {
- if(!smb_io_unistr2("unistr2", &info->uni_trusted_dc_name, info->ptr_trusted_dc_name, ps, depth))
- return False;
- }
-
- if(!prs_align(ps))
- return False;
-
- return True;
-}
-
-static bool net_io_ctrl_data_info_5(const char *desc, CTRL_DATA_INFO_5 *info, prs_struct *ps, int depth)
-{
- if (info == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_ctrl_data_info_5");
- depth++;
-
- if ( !prs_uint32( "function_code", ps, depth, &info->function_code ) )
- return False;
-
- if(!prs_uint32("ptr_domain", ps, depth, &info->ptr_domain))
- return False;
-
- if ( info->ptr_domain ) {
- if(!smb_io_unistr2("domain", &info->domain, info->ptr_domain, ps, depth))
- return False;
- }
-
- return True;
-}
-
-static bool net_io_ctrl_data_info_6(const char *desc, CTRL_DATA_INFO_6 *info, prs_struct *ps, int depth)
-{
- if (info == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_ctrl_data_info_6");
- depth++;
-
- if ( !prs_uint32( "function_code", ps, depth, &info->function_code ) )
- return False;
-
- if(!prs_uint32("ptr_domain", ps, depth, &info->ptr_domain))
- return False;
-
- if ( info->ptr_domain ) {
- if(!smb_io_unistr2("domain", &info->domain, info->ptr_domain, ps, depth))
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes an NET_Q_LOGON_CTRL2 structure.
-********************************************************************/
-
-bool net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
-{
- if (q_l == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_q_logon_ctrl2");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr ", ps, depth, &q_l->ptr))
- return False;
-
- if(!smb_io_unistr2 ("", &q_l->uni_server_name, q_l->ptr, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("function_code", ps, depth, &q_l->function_code))
- return False;
- if(!prs_uint32("query_level ", ps, depth, &q_l->query_level))
- return False;
- switch ( q_l->function_code ) {
- case NETLOGON_CONTROL_REDISCOVER:
- if ( !net_io_ctrl_data_info_5( "ctrl_data_info5", &q_l->info.info5, ps, depth) )
- return False;
- break;
-
- case NETLOGON_CONTROL_TC_QUERY:
- if ( !net_io_ctrl_data_info_6( "ctrl_data_info6", &q_l->info.info6, ps, depth) )
- return False;
- break;
-
- default:
- DEBUG(0,("net_io_q_logon_ctrl2: unknown function_code [%d]\n",
- q_l->function_code));
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- Inits an NET_Q_LOGON_CTRL2 structure.
-********************************************************************/
-
-void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, const char *srv_name,
- uint32 query_level)
-{
- DEBUG(5,("init_q_logon_ctrl2\n"));
-
- q_l->function_code = 0x01;
- q_l->query_level = query_level;
-
- init_unistr2(&q_l->uni_server_name, srv_name, UNI_STR_TERMINATE);
-}
-
-/*******************************************************************
- Inits an NET_R_LOGON_CTRL2 structure.
-********************************************************************/
-
-void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level,
- uint32 flags, uint32 pdc_status,
- uint32 logon_attempts, uint32 tc_status,
- const char *trusted_domain_name)
-{
- r_l->switch_value = query_level;
-
- switch (query_level) {
- case 1:
- r_l->ptr = 1; /* undocumented pointer */
- init_netinfo_1(&r_l->logon.info1, flags, pdc_status);
- r_l->status = NT_STATUS_OK;
- break;
- case 2:
- r_l->ptr = 1; /* undocumented pointer */
- init_netinfo_2(&r_l->logon.info2, flags, pdc_status,
- tc_status, trusted_domain_name);
- r_l->status = NT_STATUS_OK;
- break;
- case 3:
- r_l->ptr = 1; /* undocumented pointer */
- init_netinfo_3(&r_l->logon.info3, flags, logon_attempts);
- r_l->status = NT_STATUS_OK;
- break;
- default:
- DEBUG(2,("init_r_logon_ctrl2: unsupported switch value %d\n",
- r_l->switch_value));
- r_l->ptr = 0; /* undocumented pointer */
-
- /* take a guess at an error code... */
- r_l->status = NT_STATUS_INVALID_INFO_CLASS;
- break;
- }
-}
-
-/*******************************************************************
- Reads or writes an NET_R_LOGON_CTRL2 structure.
-********************************************************************/
-
-bool net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth)
-{
- if (r_l == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "net_io_r_logon_ctrl2");
- depth++;
-
- if(!prs_uint32("switch_value ", ps, depth, &r_l->switch_value))
- return False;
- if(!prs_uint32("ptr ", ps, depth, &r_l->ptr))
- return False;
-
- if (r_l->ptr != 0) {
- switch (r_l->switch_value) {
- case 1:
- if(!net_io_netinfo_1("", &r_l->logon.info1, ps, depth))
- return False;
- break;
- case 2:
- if(!net_io_netinfo_2("", &r_l->logon.info2, ps, depth))
- return False;
- break;
- case 3:
- if(!net_io_netinfo_3("", &r_l->logon.info3, ps, depth))
- return False;
- break;
- default:
- DEBUG(2,("net_io_r_logon_ctrl2: unsupported switch value %d\n",
- r_l->switch_value));
- break;
- }
- }
-
- if(!prs_ntstatus("status ", ps, depth, &r_l->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Reads or writes an NET_Q_LOGON_CTRL structure.
-********************************************************************/
-
-bool net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
- int depth)
-{
- prs_debug(ps, depth, desc, "net_io_q_logon_ctrl");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr ", ps, depth, &q_l->ptr))
- return False;
-
- if(!smb_io_unistr2 ("", &q_l->uni_server_name, q_l->ptr, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("function_code", ps, depth, &q_l->function_code))
- return False;
- if(!prs_uint32("query_level ", ps, depth, &q_l->query_level))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- Inits an NET_Q_LOGON_CTRL structure.
-********************************************************************/
-
-void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL *q_l, const char *srv_name,
- uint32 query_level)
-{
- DEBUG(5,("init_q_logon_ctrl\n"));
-
- q_l->function_code = 0x01; /* ??? */
- q_l->query_level = query_level;
-
- init_unistr2(&q_l->uni_server_name, srv_name, UNI_STR_TERMINATE);
-}
-
-/*******************************************************************
- Inits an NET_R_LOGON_CTRL structure.
-********************************************************************/
-
-void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level,
- uint32 flags, uint32 pdc_status)
-{
- DEBUG(5,("init_r_logon_ctrl\n"));
-
- r_l->switch_value = query_level; /* should only be 0x1 */
-
- switch (query_level) {
- case 1:
- r_l->ptr = 1; /* undocumented pointer */
- init_netinfo_1(&r_l->logon.info1, flags, pdc_status);
- r_l->status = NT_STATUS_OK;
- break;
- default:
- DEBUG(2,("init_r_logon_ctrl: unsupported switch value %d\n",
- r_l->switch_value));
- r_l->ptr = 0; /* undocumented pointer */
-
- /* take a guess at an error code... */
- r_l->status = NT_STATUS_INVALID_INFO_CLASS;
- break;
- }
-}
-
-/*******************************************************************
- Reads or writes an NET_R_LOGON_CTRL structure.
-********************************************************************/
-
-bool net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
- int depth)
-{
- prs_debug(ps, depth, desc, "net_io_r_logon_ctrl");
- depth++;
-
- if(!prs_uint32("switch_value ", ps, depth, &r_l->switch_value))
- return False;
- if(!prs_uint32("ptr ", ps, depth, &r_l->ptr))
- return False;
-
- if (r_l->ptr != 0) {
- switch (r_l->switch_value) {
- case 1:
- if(!net_io_netinfo_1("", &r_l->logon.info1, ps, depth))
- return False;
- break;
- default:
- DEBUG(2,("net_io_r_logon_ctrl: unsupported switch value %d\n",
- r_l->switch_value));
- break;
- }
- }
-
- if(!prs_ntstatus("status ", ps, depth, &r_l->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
Inits an NET_Q_REQ_CHAL structure.
********************************************************************/