mirror of
https://github.com/samba-team/samba.git
synced 2025-02-21 01:59:07 +03:00
files don't need to match the type names in the generated headers - with this type mapping we no longer need definitions for the deprecated "int32", "uint8" etc form of types. We can now force everyone to use the standard types int32_t, uint8_t etc. - fixed all the code that used the deprecated types - converted the IDL types "int64" and "uint64" to "dlong" and "udlong". These are the 4 byte aligned 64 bit integers that Microsoft internally define as two 32 bit integers in a structure. After discussions with Ronnie Sahlberg we decided that calling these "int64" was confusing, as it implied a true 8 byte aligned type - fixed all the cases where we incorrectly used things like "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for those. The fact that it is hyper-aligned on the wire is not relevant to the API, and should remain just a IDL property (This used to be commit f86521677d7ff16bdc4815f9524e5286026f10f3)
119 lines
2.9 KiB
C
119 lines
2.9 KiB
C
/*
|
|
Unix SMB/CIFS implementation.
|
|
|
|
endpoint server for the IOXIDResolver pipe
|
|
|
|
Copyright (C) Jelmer Vernooij 2004
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#include "includes.h"
|
|
#include "librpc/gen_ndr/ndr_oxidresolver.h"
|
|
#include "rpc_server/dcerpc_server.h"
|
|
|
|
struct OXIDObject
|
|
{
|
|
struct GUID OID;
|
|
};
|
|
|
|
struct PingSet
|
|
{
|
|
uint64_t id;
|
|
struct OXIDObject *objects;
|
|
struct PingSet *prev, *next;
|
|
};
|
|
|
|
/* Maximum number of missed ping calls before a client is presumed
|
|
* gone */
|
|
#define MAX_MISSED_PINGS 3
|
|
|
|
/* Maximum number of seconds between two ping calls */
|
|
#define MAX_PING_TIME 60
|
|
|
|
/*
|
|
ResolveOxid
|
|
*/
|
|
static WERROR ResolveOxid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid *r)
|
|
{
|
|
return WERR_NOT_SUPPORTED;
|
|
}
|
|
|
|
|
|
/*
|
|
SimplePing
|
|
*/
|
|
static WERROR SimplePing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct SimplePing *r)
|
|
{
|
|
return WERR_NOT_SUPPORTED;
|
|
}
|
|
|
|
/*
|
|
ComplexPing
|
|
*/
|
|
static WERROR ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ComplexPing *r)
|
|
{
|
|
/* struct PingSet *ps; */
|
|
|
|
/* If r->in.SetId == 0, create new PingSet */
|
|
|
|
/* Otherwise, look up pingset by id */
|
|
|
|
return WERR_NOT_SUPPORTED;
|
|
}
|
|
|
|
|
|
/*
|
|
ServerAlive
|
|
*/
|
|
static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive *r)
|
|
{
|
|
return WERR_OK;
|
|
}
|
|
|
|
|
|
/*
|
|
ResolveOxid2
|
|
*/
|
|
static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid2 *r)
|
|
{
|
|
ZERO_STRUCT(r->out);
|
|
r->out.ComVersion.MajorVersion = COM_MAJOR_VERSION;
|
|
r->out.ComVersion.MinorVersion = COM_MINOR_VERSION;
|
|
return WERR_NOT_SUPPORTED;
|
|
}
|
|
|
|
struct DUALSTRINGARRAY *dcom_server_generate_dual_string(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *state)
|
|
{
|
|
return NULL; /* FIXME */
|
|
}
|
|
|
|
/*
|
|
ServerAlive2
|
|
*/
|
|
static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive2 *r)
|
|
{
|
|
ZERO_STRUCT(r->out);
|
|
r->out.info.version.MajorVersion = COM_MAJOR_VERSION;
|
|
r->out.info.version.MinorVersion = COM_MINOR_VERSION;
|
|
r->out.dualstring = *dcom_server_generate_dual_string(mem_ctx, dce_call);
|
|
return WERR_OK;
|
|
}
|
|
|
|
/* FIXME: Garbage collect objects that haven't been pinged */
|
|
|
|
/* include the generated boilerplate */
|
|
#include "librpc/gen_ndr/ndr_oxidresolver_s.c"
|