ReactOS 0.4.15-dev-8428-g6910fa6
epm.idl File Reference
import "dcetypes.idl";
Include dependency graph for epm.idl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  epm
 
struct  epm::ept_entry_t
 

Functions

RPC_STATUS WINAPI TowerExplode (const twr_t *tower, PRPC_SYNTAX_IDENTIFIER object, PRPC_SYNTAX_IDENTIFIER syntax, char **protseq, char **endpoint, char **address)
 
RPC_STATUS WINAPI TowerConstruct (const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax, const char *protseq, const char *endpoint, const char *address, twr_t **tower)
 

Function Documentation

◆ TowerConstruct()

RPC_STATUS WINAPI TowerConstruct ( const RPC_SYNTAX_IDENTIFIER object,
const RPC_SYNTAX_IDENTIFIER syntax,
const char protseq,
const char endpoint,
const char address,
twr_t **  tower 
)

Definition at line 596 of file rpc_epmap.c.

600{
601 size_t tower_size;
603 unsigned char *p;
604 twr_uuid_floor_t *object_floor;
605 twr_uuid_floor_t *syntax_floor;
606
607 TRACE("(%p, %p, %s, %s, %s, %p)\n", object, syntax, debugstr_a(protseq),
609
610 *tower = NULL;
611
612 status = RpcTransport_GetTopOfTower(NULL, &tower_size, protseq, address, endpoint);
613
614 if (status != RPC_S_OK)
615 return status;
616
617 tower_size += sizeof(u_int16) + sizeof(*object_floor) + sizeof(*syntax_floor);
618 *tower = I_RpcAllocate(FIELD_OFFSET(twr_t, tower_octet_string[tower_size]));
619 if (!*tower)
621
622 (*tower)->tower_length = tower_size;
623 p = &(*tower)->tower_octet_string[0];
624 *(u_int16 *)p = 5; /* number of floors */
625 p += sizeof(u_int16);
626 object_floor = (twr_uuid_floor_t *)p;
627 p += sizeof(*object_floor);
628 syntax_floor = (twr_uuid_floor_t *)p;
629 p += sizeof(*syntax_floor);
630
631 object_floor->count_lhs = sizeof(object_floor->protid) + sizeof(object_floor->uuid) +
632 sizeof(object_floor->major_version);
633 object_floor->protid = EPM_PROTOCOL_UUID;
634 object_floor->count_rhs = sizeof(object_floor->minor_version);
635 object_floor->uuid = object->SyntaxGUID;
636 object_floor->major_version = object->SyntaxVersion.MajorVersion;
637 object_floor->minor_version = object->SyntaxVersion.MinorVersion;
638
639 syntax_floor->count_lhs = sizeof(syntax_floor->protid) + sizeof(syntax_floor->uuid) +
640 sizeof(syntax_floor->major_version);
641 syntax_floor->protid = EPM_PROTOCOL_UUID;
642 syntax_floor->count_rhs = sizeof(syntax_floor->minor_version);
643 syntax_floor->uuid = syntax->SyntaxGUID;
644 syntax_floor->major_version = syntax->SyntaxVersion.MajorVersion;
645 syntax_floor->minor_version = syntax->SyntaxVersion.MinorVersion;
646
647 status = RpcTransport_GetTopOfTower(p, &tower_size, protseq, address, endpoint);
648 if (status != RPC_S_OK)
649 {
650 I_RpcFree(*tower);
651 *tower = NULL;
652 return status;
653 }
654 return RPC_S_OK;
655}
unsigned short u_int16
Definition: dcetypes.idl:33
#define NULL
Definition: types.h:112
#define EPM_PROTOCOL_UUID
Definition: epm_towers.h:35
GLuint address
Definition: glext.h:9393
GLfloat GLfloat p
Definition: glext.h:8902
#define debugstr_a
Definition: kernel32.h:31
RPC_STATUS RpcTransport_GetTopOfTower(unsigned char *tower_data, size_t *tower_size, const char *protseq, const char *networkaddr, const char *endpoint) DECLSPEC_HIDDEN
#define RPC_S_OK
Definition: rpcnterr.h:22
void WINAPI I_RpcFree(void *Object)
Definition: rpcrt4_main.c:724
void *WINAPI I_RpcAllocate(unsigned int Size)
Definition: rpcrt4_main.c:716
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
RPC_VERSION SyntaxVersion
Definition: rpcdcep.h:33
unsigned short MajorVersion
Definition: rpcdcep.h:27
unsigned short MinorVersion
Definition: rpcdcep.h:28
Definition: nis.h:10
Definition: ps.c:97
Definition: rpc.c:45
u_int16 minor_version
Definition: epm_towers.h:62
u_int16 count_lhs
Definition: epm_towers.h:57
u_int16 count_rhs
Definition: epm_towers.h:61
u_int16 major_version
Definition: epm_towers.h:60
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define RPC_S_OUT_OF_RESOURCES
Definition: winerror.h:1032

Referenced by epm_register(), ept_map(), RpcEpResolveBinding(), and RpcEpUnregister().

◆ TowerExplode()

RPC_STATUS WINAPI TowerExplode ( const twr_t tower,
PRPC_SYNTAX_IDENTIFIER  object,
PRPC_SYNTAX_IDENTIFIER  syntax,
char **  protseq,
char **  endpoint,
char **  address 
)

Definition at line 524 of file rpc_epmap.c.

527{
528 size_t tower_size;
530 const unsigned char *p;
531 u_int16 floor_count;
532 const twr_uuid_floor_t *object_floor;
533 const twr_uuid_floor_t *syntax_floor;
534
535 TRACE("(%p, %p, %p, %p, %p, %p)\n", tower, object, syntax, protseq,
537
538 if (protseq)
539 *protseq = NULL;
540 if (endpoint)
541 *endpoint = NULL;
542 if (address)
543 *address = NULL;
544
545 tower_size = tower->tower_length;
546
547 if (tower_size < sizeof(u_int16))
549
550 p = &tower->tower_octet_string[0];
551
552 floor_count = *(const u_int16 *)p;
553 p += sizeof(u_int16);
554 tower_size -= sizeof(u_int16);
555 TRACE("floor_count: %d\n", floor_count);
556 /* FIXME: should we do something with the floor count? at the moment we don't */
557
558 if (tower_size < sizeof(*object_floor) + sizeof(*syntax_floor))
560
561 object_floor = (const twr_uuid_floor_t *)p;
562 p += sizeof(*object_floor);
563 tower_size -= sizeof(*object_floor);
564 syntax_floor = (const twr_uuid_floor_t *)p;
565 p += sizeof(*syntax_floor);
566 tower_size -= sizeof(*syntax_floor);
567
568 if ((object_floor->count_lhs != sizeof(object_floor->protid) +
569 sizeof(object_floor->uuid) + sizeof(object_floor->major_version)) ||
570 (object_floor->protid != EPM_PROTOCOL_UUID) ||
571 (object_floor->count_rhs != sizeof(object_floor->minor_version)))
573
574 if ((syntax_floor->count_lhs != sizeof(syntax_floor->protid) +
575 sizeof(syntax_floor->uuid) + sizeof(syntax_floor->major_version)) ||
576 (syntax_floor->protid != EPM_PROTOCOL_UUID) ||
577 (syntax_floor->count_rhs != sizeof(syntax_floor->minor_version)))
579
580 status = RpcTransport_ParseTopOfTower(p, tower_size, protseq, address, endpoint);
581 if ((status == RPC_S_OK) && syntax && object)
582 {
583 syntax->SyntaxGUID = syntax_floor->uuid;
584 syntax->SyntaxVersion.MajorVersion = syntax_floor->major_version;
585 syntax->SyntaxVersion.MinorVersion = syntax_floor->minor_version;
586 object->SyntaxGUID = object_floor->uuid;
587 object->SyntaxVersion.MajorVersion = object_floor->major_version;
588 object->SyntaxVersion.MinorVersion = object_floor->minor_version;
589 }
590 return status;
591}
RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data, size_t tower_size, char **protseq, char **networkaddr, char **endpoint) DECLSPEC_HIDDEN
byte tower_octet_string[1]
Definition: rpc.c:47
unsigned32 tower_length
Definition: rpc.c:46
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1061

Referenced by ept_delete(), ept_insert(), ept_map(), and RpcEpResolveBinding().